@ibiz-template-plugin/ai-chat 0.0.85 → 0.0.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -31,12 +31,12 @@ var si = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
31
31
  return typeof n != "function" || n.hasOwnProperty("prototype");
32
32
  }), xf = ro, oi = Function.prototype.call, so = xf ? oi.bind(oi) : function() {
33
33
  return oi.apply(oi, arguments);
34
- }, Dc = {}, $c = {}.propertyIsEnumerable, Pc = Object.getOwnPropertyDescriptor, Sf = Pc && !$c.call({ 1: 2 }, 1);
34
+ }, Dc = {}, $c = {}.propertyIsEnumerable, Rc = Object.getOwnPropertyDescriptor, Sf = Rc && !$c.call({ 1: 2 }, 1);
35
35
  Dc.f = Sf ? function(e) {
36
- var t = Pc(this, e);
36
+ var t = Rc(this, e);
37
37
  return !!t && t.enumerable;
38
38
  } : $c;
39
- var Rc = function(n, e) {
39
+ var Pc = function(n, e) {
40
40
  return {
41
41
  enumerable: !(n & 1),
42
42
  configurable: !(n & 2),
@@ -59,14 +59,14 @@ var Rc = function(n, e) {
59
59
  if (Af(n))
60
60
  throw new Df("Can't call method on " + n);
61
61
  return n;
62
- }, $f = Vc, Pf = jc, rr = function(n) {
63
- return $f(Pf(n));
62
+ }, $f = Vc, Rf = jc, rr = function(n) {
63
+ return $f(Rf(n));
64
64
  }, Nr = typeof document == "object" && document.all, tt = typeof Nr > "u" && Nr !== void 0 ? function(n) {
65
65
  return typeof n == "function" || n === Nr;
66
66
  } : function(n) {
67
67
  return typeof n == "function";
68
- }, Rf = tt, Xn = function(n) {
69
- return typeof n == "object" ? n !== null : Rf(n);
68
+ }, Pf = tt, Xn = function(n) {
69
+ return typeof n == "object" ? n !== null : Pf(n);
70
70
  }, Er = je, Lf = tt, zf = function(n) {
71
71
  return Lf(n) ? n : void 0;
72
72
  }, oo = function(n, e) {
@@ -136,10 +136,10 @@ var lo = Gc.exports, ua = lo, Xc = function(n, e) {
136
136
  throw new Ip("Can't convert object to primitive value");
137
137
  }
138
138
  return e === void 0 && (e = "number"), Ep(n, e);
139
- }, $p = Dp, Pp = Kc, eu = function(n) {
139
+ }, $p = Dp, Rp = Kc, eu = function(n) {
140
140
  var e = $p(n, "string");
141
- return Pp(e) ? e : e + "";
142
- }, Rp = je, pa = Xn, bs = Rp.document, Lp = pa(bs) && pa(bs.createElement), tu = function(n) {
141
+ return Rp(e) ? e : e + "";
142
+ }, Pp = je, pa = Xn, bs = Pp.document, Lp = pa(bs) && pa(bs.createElement), tu = function(n) {
143
143
  return Lp ? bs.createElement(n) : {};
144
144
  }, zp = St, Bp = xt, Fp = tu, nu = !zp && !Bp(function() {
145
145
  return Object.defineProperty(Fp("div"), "a", {
@@ -147,7 +147,7 @@ var lo = Gc.exports, ua = lo, Xc = function(n, e) {
147
147
  return 7;
148
148
  }
149
149
  }).a !== 7;
150
- }), Vp = St, Hp = so, jp = Dc, Wp = Rc, Up = rr, qp = eu, Kp = qt, Jp = nu, ma = Object.getOwnPropertyDescriptor;
150
+ }), Vp = St, Hp = so, jp = Dc, Wp = Pc, Up = rr, qp = eu, Kp = qt, Jp = nu, ma = Object.getOwnPropertyDescriptor;
151
151
  io.f = Vp ? ma : function(e, t) {
152
152
  if (e = Up(e), t = qp(t), Jp)
153
153
  try {
@@ -167,28 +167,28 @@ var wn = {}, Gp = St, Xp = xt, iu = Gp && Xp(function() {
167
167
  if (Yp(n))
168
168
  return n;
169
169
  throw new Qp(Zp(n) + " is not an object");
170
- }, e1 = St, t1 = nu, n1 = iu, ai = sr, ga = eu, i1 = TypeError, Pr = Object.defineProperty, r1 = Object.getOwnPropertyDescriptor, Rr = "enumerable", Lr = "configurable", zr = "writable";
170
+ }, e1 = St, t1 = nu, n1 = iu, ai = sr, ga = eu, i1 = TypeError, Rr = Object.defineProperty, r1 = Object.getOwnPropertyDescriptor, Pr = "enumerable", Lr = "configurable", zr = "writable";
171
171
  wn.f = e1 ? n1 ? function(e, t, i) {
172
172
  if (ai(e), t = ga(t), ai(i), typeof e == "function" && t === "prototype" && "value" in i && zr in i && !i[zr]) {
173
173
  var r = r1(e, t);
174
174
  r && r[zr] && (e[t] = i.value, i = {
175
175
  configurable: Lr in i ? i[Lr] : r[Lr],
176
- enumerable: Rr in i ? i[Rr] : r[Rr],
176
+ enumerable: Pr in i ? i[Pr] : r[Pr],
177
177
  writable: !1
178
178
  });
179
179
  }
180
- return Pr(e, t, i);
181
- } : Pr : function(e, t, i) {
180
+ return Rr(e, t, i);
181
+ } : Rr : function(e, t, i) {
182
182
  if (ai(e), t = ga(t), ai(i), t1)
183
183
  try {
184
- return Pr(e, t, i);
184
+ return Rr(e, t, i);
185
185
  } catch (r) {
186
186
  }
187
187
  if ("get" in i || "set" in i)
188
188
  throw new i1("Accessors not supported");
189
189
  return "value" in i && (e[t] = i.value), e;
190
190
  };
191
- var s1 = St, o1 = wn, a1 = Rc, ru = s1 ? function(n, e, t) {
191
+ var s1 = St, o1 = wn, a1 = Pc, ru = s1 ? function(n, e, t) {
192
192
  return o1.f(n, e, a1(1, t));
193
193
  } : function(n, e, t) {
194
194
  return n[e] = t, n;
@@ -203,8 +203,8 @@ p1(Cs.inspectSource) || (Cs.inspectSource = function(n) {
203
203
  });
204
204
  var g1 = Cs.inspectSource, v1 = je, y1 = tt, va = v1.WeakMap, b1 = y1(va) && /native code/.test(String(va)), w1 = Xc, C1 = Zc, ya = w1("keys"), au = function(n) {
205
205
  return ya[n] || (ya[n] = C1(n));
206
- }, uo = {}, k1 = b1, lu = je, x1 = Xn, S1 = ru, Br = qt, Fr = lo, T1 = au, M1 = uo, ba = "Object already initialized", ks = lu.TypeError, _1 = lu.WeakMap, Pi, Ln, Ri, N1 = function(n) {
207
- return Ri(n) ? Ln(n) : Pi(n, {});
206
+ }, uo = {}, k1 = b1, lu = je, x1 = Xn, S1 = ru, Br = qt, Fr = lo, T1 = au, M1 = uo, ba = "Object already initialized", ks = lu.TypeError, _1 = lu.WeakMap, Ri, Ln, Pi, N1 = function(n) {
207
+ return Pi(n) ? Ln(n) : Ri(n, {});
208
208
  }, E1 = function(n) {
209
209
  return function(e) {
210
210
  var t;
@@ -215,34 +215,34 @@ var g1 = Cs.inspectSource, v1 = je, y1 = tt, va = v1.WeakMap, b1 = y1(va) && /na
215
215
  };
216
216
  if (k1 || Fr.state) {
217
217
  var Xe = Fr.state || (Fr.state = new _1());
218
- Xe.get = Xe.get, Xe.has = Xe.has, Xe.set = Xe.set, Pi = function(n, e) {
218
+ Xe.get = Xe.get, Xe.has = Xe.has, Xe.set = Xe.set, Ri = function(n, e) {
219
219
  if (Xe.has(n))
220
220
  throw new ks(ba);
221
221
  return e.facade = n, Xe.set(n, e), e;
222
222
  }, Ln = function(n) {
223
223
  return Xe.get(n) || {};
224
- }, Ri = function(n) {
224
+ }, Pi = function(n) {
225
225
  return Xe.has(n);
226
226
  };
227
227
  } else {
228
228
  var Xt = T1("state");
229
- M1[Xt] = !0, Pi = function(n, e) {
229
+ M1[Xt] = !0, Ri = function(n, e) {
230
230
  if (Br(n, Xt))
231
231
  throw new ks(ba);
232
232
  return e.facade = n, S1(n, Xt, e), e;
233
233
  }, Ln = function(n) {
234
234
  return Br(n, Xt) ? n[Xt] : {};
235
- }, Ri = function(n) {
235
+ }, Pi = function(n) {
236
236
  return Br(n, Xt);
237
237
  };
238
238
  }
239
239
  var O1 = {
240
- set: Pi,
240
+ set: Ri,
241
241
  get: Ln,
242
- has: Ri,
242
+ has: Pi,
243
243
  enforce: N1,
244
244
  getterFor: E1
245
- }, ho = Ge, I1 = xt, A1 = tt, li = qt, xs = St, D1 = h1.CONFIGURABLE, $1 = g1, cu = O1, P1 = cu.enforce, R1 = cu.get, wa = String, Mi = Object.defineProperty, L1 = ho("".slice), z1 = ho("".replace), B1 = ho([].join), F1 = xs && !I1(function() {
245
+ }, ho = Ge, I1 = xt, A1 = tt, li = qt, xs = St, D1 = h1.CONFIGURABLE, $1 = g1, cu = O1, R1 = cu.enforce, P1 = cu.get, wa = String, Mi = Object.defineProperty, L1 = ho("".slice), z1 = ho("".replace), B1 = ho([].join), F1 = xs && !I1(function() {
246
246
  return Mi(function() {
247
247
  }, "length", { value: 8 }).length !== 8;
248
248
  }), V1 = String(String).split("String"), H1 = su.exports = function(n, e, t) {
@@ -251,11 +251,11 @@ var O1 = {
251
251
  t && li(t, "constructor") && t.constructor ? xs && Mi(n, "prototype", { writable: !1 }) : n.prototype && (n.prototype = void 0);
252
252
  } catch (r) {
253
253
  }
254
- var i = P1(n);
254
+ var i = R1(n);
255
255
  return li(i, "source") || (i.source = B1(V1, typeof e == "string" ? e : "")), n;
256
256
  };
257
257
  Function.prototype.toString = H1(function() {
258
- return A1(this) && R1(this).source || $1(this);
258
+ return A1(this) && P1(this).source || $1(this);
259
259
  }, "toString");
260
260
  var j1 = su.exports, W1 = tt, U1 = wn, q1 = j1, K1 = ao, J1 = function(n, e, t, i) {
261
261
  i || (i = {});
@@ -343,10 +343,10 @@ var ym = oo, bm = Ge, wm = uu, Cm = pu, km = sr, xm = bm([].concat), Sm = ym("Re
343
343
  }
344
344
  }, Em = xt, Om = tt, Im = /#|\.prototype\./, Yn = function(n, e) {
345
345
  var t = Dm[Am(n)];
346
- return t === Pm ? !0 : t === $m ? !1 : Om(e) ? Em(e) : !!e;
346
+ return t === Rm ? !0 : t === $m ? !1 : Om(e) ? Em(e) : !!e;
347
347
  }, Am = Yn.normalize = function(n) {
348
348
  return String(n).replace(Im, ".").toLowerCase();
349
- }, Dm = Yn.data = {}, $m = Yn.NATIVE = "N", Pm = Yn.POLYFILL = "P", Rm = Yn, ci = je, Lm = io.f, zm = ru, Bm = J1, Fm = ao, Vm = Nm, Hm = Rm, jm = function(n, e) {
349
+ }, Dm = Yn.data = {}, $m = Yn.NATIVE = "N", Rm = Yn.POLYFILL = "P", Pm = Yn, ci = je, Lm = io.f, zm = ru, Bm = J1, Fm = ao, Vm = Nm, Hm = Pm, jm = function(n, e) {
350
350
  var t = n.target, i = n.global, r = n.stat, s, o, a, l, c, u;
351
351
  if (i ? o = ci : r ? o = ci[t] || Fm(t, {}) : o = ci[t] && ci[t].prototype, o)
352
352
  for (a in e) {
@@ -435,7 +435,7 @@ var N0 = je, E0 = Ge, O0 = function(n, e) {
435
435
  return E0(N0[n].prototype[e]);
436
436
  }, I0 = O0;
437
437
  I0("Array", "findLast");
438
- var or, P, yu, bu, It, Oa, wu, Cu, ku, po, Ns, Es, xu, zn = {}, Su = [], A0 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Zn = Array.isArray;
438
+ var or, R, yu, bu, It, Oa, wu, Cu, ku, po, Ns, Es, xu, zn = {}, Su = [], A0 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Zn = Array.isArray;
439
439
  function rt(n, e) {
440
440
  for (var t in e)
441
441
  n[t] = e[t];
@@ -455,7 +455,7 @@ function Ee(n, e, t) {
455
455
  }
456
456
  function Ni(n, e, t, i, r) {
457
457
  var s = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: r == null ? ++yu : r, __i: -1, __u: 0 };
458
- return r == null && P.vnode != null && P.vnode(s), s;
458
+ return r == null && R.vnode != null && R.vnode(s), s;
459
459
  }
460
460
  function Ia() {
461
461
  return { current: null };
@@ -486,16 +486,16 @@ function Tu(n) {
486
486
  }
487
487
  }
488
488
  function Os(n) {
489
- (!n.__d && (n.__d = !0) && It.push(n) && !Li.__r++ || Oa != P.debounceRendering) && ((Oa = P.debounceRendering) || wu)(Li);
489
+ (!n.__d && (n.__d = !0) && It.push(n) && !Li.__r++ || Oa != R.debounceRendering) && ((Oa = R.debounceRendering) || wu)(Li);
490
490
  }
491
491
  function Li() {
492
492
  for (var n, e, t, i, r, s, o, a = 1; It.length; )
493
- It.length > a && It.sort(Cu), n = It.shift(), a = It.length, n.__d && (t = void 0, i = void 0, r = (i = (e = n).__v).__e, s = [], o = [], e.__P && ((t = rt({}, i)).__v = i.__v + 1, P.vnode && P.vnode(t), go(e.__P, t, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [r] : null, s, r == null ? fn(i) : r, !!(32 & i.__u), o), t.__v = i.__v, t.__.__k[t.__i] = t, Nu(s, t, o), i.__e = i.__ = null, t.__e != r && Tu(t)));
493
+ It.length > a && It.sort(Cu), n = It.shift(), a = It.length, n.__d && (t = void 0, i = void 0, r = (i = (e = n).__v).__e, s = [], o = [], e.__P && ((t = rt({}, i)).__v = i.__v + 1, R.vnode && R.vnode(t), go(e.__P, t, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [r] : null, s, r == null ? fn(i) : r, !!(32 & i.__u), o), t.__v = i.__v, t.__.__k[t.__i] = t, Nu(s, t, o), i.__e = i.__ = null, t.__e != r && Tu(t)));
494
494
  Li.__r = 0;
495
495
  }
496
496
  function Mu(n, e, t, i, r, s, o, a, l, c, u) {
497
- var d, f, p, m, v, y, g, b = i && i.__k || Su, w = e.length;
498
- for (l = D0(t, e, b, l, w), d = 0; d < w; d++)
497
+ var d, f, p, m, v, y, g, b = i && i.__k || Su, k = e.length;
498
+ for (l = D0(t, e, b, l, k), d = 0; d < k; d++)
499
499
  (p = t.__k[d]) != null && (f = p.__i == -1 ? zn : b[p.__i] || zn, p.__i = d, y = go(n, p, f, r, s, o, a, l, c, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && vo(f.ref, null, p), u.push(p.ref, p.__c || m, p)), v == null && m != null && (v = m), (g = !!(4 & p.__u)) || f.__k === p.__k ? l = _u(p, l, n, g) : typeof p.type == "function" && y !== void 0 ? l = y : m && (l = m.nextSibling), p.__u &= -7);
500
500
  return t.__e = v, l;
501
501
  }
@@ -576,22 +576,22 @@ function Da(n) {
576
576
  e.t = po++;
577
577
  else if (e.t < t.u)
578
578
  return;
579
- return t(P.event ? P.event(e) : e);
579
+ return t(R.event ? R.event(e) : e);
580
580
  }
581
581
  };
582
582
  }
583
583
  function go(n, e, t, i, r, s, o, a, l, c) {
584
- var u, d, f, p, m, v, y, g, b, w, k, x, T, M, O, E, V, W = e.type;
584
+ var u, d, f, p, m, v, y, g, b, k, w, x, T, M, O, E, V, W = e.type;
585
585
  if (e.constructor != null)
586
586
  return null;
587
- 128 & t.__u && (l = !!(32 & t.__u), s = [a = e.__e = t.__e]), (u = P.__b) && u(e);
587
+ 128 & t.__u && (l = !!(32 & t.__u), s = [a = e.__e = t.__e]), (u = R.__b) && u(e);
588
588
  e:
589
589
  if (typeof W == "function")
590
590
  try {
591
- if (g = e.props, b = "prototype" in W && W.prototype.render, w = (u = W.contextType) && i[u.__c], k = u ? w ? w.props.value : u.__ : i, t.__c ? y = (d = e.__c = t.__c).__ = d.__E : (b ? e.__c = d = new W(g, k) : (e.__c = d = new Be(g, k), d.constructor = W, d.render = R0), w && w.sub(d), d.props = g, d.state || (d.state = {}), d.context = k, d.__n = i, f = d.__d = !0, d.__h = [], d._sb = []), b && d.__s == null && (d.__s = d.state), b && W.getDerivedStateFromProps != null && (d.__s == d.state && (d.__s = rt({}, d.__s)), rt(d.__s, W.getDerivedStateFromProps(g, d.__s))), p = d.props, m = d.state, d.__v = e, f)
591
+ if (g = e.props, b = "prototype" in W && W.prototype.render, k = (u = W.contextType) && i[u.__c], w = u ? k ? k.props.value : u.__ : i, t.__c ? y = (d = e.__c = t.__c).__ = d.__E : (b ? e.__c = d = new W(g, w) : (e.__c = d = new Be(g, w), d.constructor = W, d.render = P0), k && k.sub(d), d.props = g, d.state || (d.state = {}), d.context = w, d.__n = i, f = d.__d = !0, d.__h = [], d._sb = []), b && d.__s == null && (d.__s = d.state), b && W.getDerivedStateFromProps != null && (d.__s == d.state && (d.__s = rt({}, d.__s)), rt(d.__s, W.getDerivedStateFromProps(g, d.__s))), p = d.props, m = d.state, d.__v = e, f)
592
592
  b && W.getDerivedStateFromProps == null && d.componentWillMount != null && d.componentWillMount(), b && d.componentDidMount != null && d.__h.push(d.componentDidMount);
593
593
  else {
594
- if (b && W.getDerivedStateFromProps == null && g !== p && d.componentWillReceiveProps != null && d.componentWillReceiveProps(g, k), !d.__e && d.shouldComponentUpdate != null && d.shouldComponentUpdate(g, d.__s, k) === !1 || e.__v == t.__v) {
594
+ if (b && W.getDerivedStateFromProps == null && g !== p && d.componentWillReceiveProps != null && d.componentWillReceiveProps(g, w), !d.__e && d.shouldComponentUpdate != null && d.shouldComponentUpdate(g, d.__s, w) === !1 || e.__v == t.__v) {
595
595
  for (e.__v != t.__v && (d.props = g, d.state = d.__s, d.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.some(function(oe) {
596
596
  oe && (oe.__ = e);
597
597
  }), x = 0; x < d._sb.length; x++)
@@ -599,11 +599,11 @@ function go(n, e, t, i, r, s, o, a, l, c) {
599
599
  d._sb = [], d.__h.length && o.push(d);
600
600
  break e;
601
601
  }
602
- d.componentWillUpdate != null && d.componentWillUpdate(g, d.__s, k), b && d.componentDidUpdate != null && d.__h.push(function() {
602
+ d.componentWillUpdate != null && d.componentWillUpdate(g, d.__s, w), b && d.componentDidUpdate != null && d.__h.push(function() {
603
603
  d.componentDidUpdate(p, m, v);
604
604
  });
605
605
  }
606
- if (d.context = k, d.props = g, d.__P = n, d.__e = !1, T = P.__r, M = 0, b) {
606
+ if (d.context = w, d.props = g, d.__P = n, d.__e = !1, T = R.__r, M = 0, b) {
607
607
  for (d.state = d.__s, d.__d = !1, T && T(e), u = d.render(d.props, d.state, d.context), O = 0; O < d._sb.length; O++)
608
608
  d.__h.push(d._sb[O]);
609
609
  d._sb = [];
@@ -625,11 +625,11 @@ function go(n, e, t, i, r, s, o, a, l, c) {
625
625
  }
626
626
  else
627
627
  e.__e = t.__e, e.__k = t.__k, oe.then || Is(e);
628
- P.__e(oe, e, t);
628
+ R.__e(oe, e, t);
629
629
  }
630
630
  else
631
- s == null && e.__v == t.__v ? (e.__k = t.__k, e.__e = t.__e) : a = e.__e = P0(t.__e, e, t, i, r, s, o, l, c);
632
- return (u = P.diffed) && u(e), 128 & e.__u ? void 0 : a;
631
+ s == null && e.__v == t.__v ? (e.__k = t.__k, e.__e = t.__e) : a = e.__e = R0(t.__e, e, t, i, r, s, o, l, c);
632
+ return (u = R.diffed) && u(e), 128 & e.__u ? void 0 : a;
633
633
  }
634
634
  function Is(n) {
635
635
  n && n.__c && (n.__c.__e = !0), n && n.__k && n.__k.forEach(Is);
@@ -637,20 +637,20 @@ function Is(n) {
637
637
  function Nu(n, e, t) {
638
638
  for (var i = 0; i < t.length; i++)
639
639
  vo(t[i], t[++i], t[++i]);
640
- P.__c && P.__c(e, n), n.some(function(r) {
640
+ R.__c && R.__c(e, n), n.some(function(r) {
641
641
  try {
642
642
  n = r.__h, r.__h = [], n.some(function(s) {
643
643
  s.call(r);
644
644
  });
645
645
  } catch (s) {
646
- P.__e(s, r.__v);
646
+ R.__e(s, r.__v);
647
647
  }
648
648
  });
649
649
  }
650
650
  function Eu(n) {
651
651
  return typeof n != "object" || n == null || n.__b && n.__b > 0 ? n : Zn(n) ? n.map(Eu) : rt({}, n);
652
652
  }
653
- function P0(n, e, t, i, r, s, o, a, l) {
653
+ function R0(n, e, t, i, r, s, o, a, l) {
654
654
  var c, u, d, f, p, m, v, y = t.props, g = e.props, b = e.type;
655
655
  if (b == "svg" ? r = "http://www.w3.org/2000/svg" : b == "math" ? r = "http://www.w3.org/1998/Math/MathML" : r || (r = "http://www.w3.org/1999/xhtml"), s != null) {
656
656
  for (c = 0; c < s.length; c++)
@@ -662,7 +662,7 @@ function P0(n, e, t, i, r, s, o, a, l) {
662
662
  if (n == null) {
663
663
  if (b == null)
664
664
  return document.createTextNode(g);
665
- n = document.createElementNS(r, b, g.is && g), a && (P.__m && P.__m(e, s), a = !1), s = null;
665
+ n = document.createElementNS(r, b, g.is && g), a && (R.__m && R.__m(e, s), a = !1), s = null;
666
666
  }
667
667
  if (b == null)
668
668
  y === g || a && n.data == g || (n.data = g);
@@ -699,17 +699,17 @@ function vo(n, e, t) {
699
699
  } else
700
700
  n.current = e;
701
701
  } catch (r) {
702
- P.__e(r, t);
702
+ R.__e(r, t);
703
703
  }
704
704
  }
705
705
  function Ou(n, e, t) {
706
706
  var i, r;
707
- if (P.unmount && P.unmount(n), (i = n.ref) && (i.current && i.current != n.__e || vo(i, null, e)), (i = n.__c) != null) {
707
+ if (R.unmount && R.unmount(n), (i = n.ref) && (i.current && i.current != n.__e || vo(i, null, e)), (i = n.__c) != null) {
708
708
  if (i.componentWillUnmount)
709
709
  try {
710
710
  i.componentWillUnmount();
711
711
  } catch (s) {
712
- P.__e(s, e);
712
+ R.__e(s, e);
713
713
  }
714
714
  i.base = i.__P = null;
715
715
  }
@@ -718,12 +718,12 @@ function Ou(n, e, t) {
718
718
  i[r] && Ou(i[r], e, t || typeof n.type != "function");
719
719
  t || mo(n.__e), n.__c = n.__ = n.__e = void 0;
720
720
  }
721
- function R0(n, e, t) {
721
+ function P0(n, e, t) {
722
722
  return this.constructor(n, t);
723
723
  }
724
724
  function Le(n, e, t) {
725
725
  var i, r, s, o;
726
- e == document && (e = document.documentElement), P.__ && P.__(n, e), r = (i = typeof t == "function") ? null : t && t.__k || e.__k, s = [], o = [], go(e, n = (!i && t || e).__k = Ee(Je, null, [n]), r || zn, zn, e.namespaceURI, !i && t ? [t] : r ? null : e.firstChild ? or.call(e.childNodes) : null, s, !i && t ? t : r ? r.__e : e.firstChild, i, o), Nu(s, n, o);
726
+ e == document && (e = document.documentElement), R.__ && R.__(n, e), r = (i = typeof t == "function") ? null : t && t.__k || e.__k, s = [], o = [], go(e, n = (!i && t || e).__k = Ee(Je, null, [n]), r || zn, zn, e.namespaceURI, !i && t ? [t] : r ? null : e.firstChild ? or.call(e.childNodes) : null, s, !i && t ? t : r ? r.__e : e.firstChild, i, o), Nu(s, n, o);
727
727
  }
728
728
  function Iu(n) {
729
729
  function e(t) {
@@ -748,7 +748,7 @@ function Iu(n) {
748
748
  return t.children(i);
749
749
  }).contextType = e, e;
750
750
  }
751
- or = Su.slice, P = { __e: function(n, e, t, i) {
751
+ or = Su.slice, R = { __e: function(n, e, t, i) {
752
752
  for (var r, s, o; e = e.__; )
753
753
  if ((r = e.__c) && !r.__)
754
754
  try {
@@ -779,7 +779,7 @@ function h(n, e, t, i, r, s) {
779
779
  if (typeof n == "function" && (o = n.defaultProps))
780
780
  for (a in o)
781
781
  l[a] === void 0 && (l[a] = o[a]);
782
- return P.vnode && P.vnode(c), c;
782
+ return R.vnode && R.vnode(c), c;
783
783
  }
784
784
  const z0 = "ibiz", B0 = "is-";
785
785
  function Mt(n, e, t, i, r) {
@@ -1890,7 +1890,7 @@ class $u {
1890
1890
  return { completed: s, toolCalls: l };
1891
1891
  }
1892
1892
  }
1893
- class Pu {
1893
+ class Ru {
1894
1894
  /**
1895
1895
  * 解析聊天步骤字符串
1896
1896
  * @param chatStepString
@@ -1960,7 +1960,7 @@ class Y0 {
1960
1960
  return t;
1961
1961
  }
1962
1962
  }
1963
- var Vt, J, jr, Pa, pn = 0, Ru = [], ee = P, Ra = ee.__b, La = ee.__r, za = ee.diffed, Ba = ee.__c, Fa = ee.unmount, Va = ee.__;
1963
+ var Vt, J, jr, Ra, pn = 0, Pu = [], ee = R, Pa = ee.__b, La = ee.__r, za = ee.diffed, Ba = ee.__c, Fa = ee.unmount, Va = ee.__;
1964
1964
  function Qn(n, e) {
1965
1965
  ee.__h && ee.__h(J, n, pn || e), pn = 0;
1966
1966
  var t = J.__H || (J.__H = { __: [], __h: [] });
@@ -2005,7 +2005,7 @@ function Z0(n, e, t) {
2005
2005
  }
2006
2006
  return i.__N || i.__;
2007
2007
  }
2008
- function R(n, e) {
2008
+ function P(n, e) {
2009
2009
  var t = Qn(Vt++, 3);
2010
2010
  !ee.__s && bo(t.__H, e) && (t.__ = n, t.u = e, J.__H.__h.push(t));
2011
2011
  }
@@ -2046,7 +2046,7 @@ function yo(n) {
2046
2046
  return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(J)), e.props.value) : n.__;
2047
2047
  }
2048
2048
  function tg() {
2049
- for (var n; n = Ru.shift(); )
2049
+ for (var n; n = Pu.shift(); )
2050
2050
  if (n.__P && n.__H)
2051
2051
  try {
2052
2052
  n.__H.__h.forEach(Ei), n.__H.__h.forEach($s), n.__H.__h = [];
@@ -2055,7 +2055,7 @@ function tg() {
2055
2055
  }
2056
2056
  }
2057
2057
  ee.__b = function(n) {
2058
- J = null, Ra && Ra(n);
2058
+ J = null, Pa && Pa(n);
2059
2059
  }, ee.__ = function(n, e) {
2060
2060
  n && e.__k && e.__k.__m && (n.__m = e.__k.__m), Va && Va(n, e);
2061
2061
  }, ee.__r = function(n) {
@@ -2067,7 +2067,7 @@ ee.__b = function(n) {
2067
2067
  }, ee.diffed = function(n) {
2068
2068
  za && za(n);
2069
2069
  var e = n.__c;
2070
- e && e.__H && (e.__H.__h.length && (Ru.push(e) !== 1 && Pa === ee.requestAnimationFrame || ((Pa = ee.requestAnimationFrame) || ng)(tg)), e.__H.__.forEach(function(t) {
2070
+ e && e.__H && (e.__H.__h.length && (Pu.push(e) !== 1 && Ra === ee.requestAnimationFrame || ((Ra = ee.requestAnimationFrame) || ng)(tg)), e.__H.__.forEach(function(t) {
2071
2071
  t.u && (t.__H = t.u), t.u = void 0;
2072
2072
  })), jr = J = null;
2073
2073
  }, ee.__c = function(n, e) {
@@ -2123,7 +2123,7 @@ function wo() {
2123
2123
  else {
2124
2124
  for (var n, e = !1; In !== void 0; ) {
2125
2125
  var t = In;
2126
- for (In = void 0, Ps++; t !== void 0; ) {
2126
+ for (In = void 0, Rs++; t !== void 0; ) {
2127
2127
  var i = t.o;
2128
2128
  if (t.o = void 0, t.f &= -3, !(8 & t.f) && Fu(t))
2129
2129
  try {
@@ -2134,7 +2134,7 @@ function wo() {
2134
2134
  t = i;
2135
2135
  }
2136
2136
  }
2137
- if (Ps = 0, cn--, e)
2137
+ if (Rs = 0, cn--, e)
2138
2138
  throw n;
2139
2139
  }
2140
2140
  }
@@ -2148,7 +2148,7 @@ function zu(n) {
2148
2148
  H = e;
2149
2149
  }
2150
2150
  }
2151
- var In = void 0, cn = 0, Ps = 0, Bi = 0;
2151
+ var In = void 0, cn = 0, Rs = 0, Bi = 0;
2152
2152
  function Bu(n) {
2153
2153
  if (H !== void 0) {
2154
2154
  var e = n.n;
@@ -2217,7 +2217,7 @@ Object.defineProperty(ge.prototype, "value", { get: function() {
2217
2217
  return n !== void 0 && (n.i = this.i), this.v;
2218
2218
  }, set: function(n) {
2219
2219
  if (n !== this.v) {
2220
- if (Ps > 100)
2220
+ if (Rs > 100)
2221
2221
  throw new Error("Cycle detected");
2222
2222
  this.v = n, this.i++, Bi++, cn++;
2223
2223
  try {
@@ -2374,7 +2374,7 @@ function xo(n, e) {
2374
2374
  }
2375
2375
  var lr, Wr;
2376
2376
  function xn(n, e) {
2377
- P[n] = e.bind(null, P[n] || function() {
2377
+ R[n] = e.bind(null, R[n] || function() {
2378
2378
  });
2379
2379
  }
2380
2380
  function Fi(n) {
@@ -2534,7 +2534,7 @@ const Uu = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "
2534
2534
  xmlns: "http://www.w3.org/2000/svg",
2535
2535
  children: /* @__PURE__ */ h("path", { d: "M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-0.9 3.7-0.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 0.7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-0.8 4.2-2.6 5-5 1.4-4.2-0.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z" })
2536
2536
  }
2537
- ), lg = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ h("path", { d: "M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z" }) }), Rs = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ h("path", { d: "M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z" }) }), cg = () => /* @__PURE__ */ h(
2537
+ ), lg = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ h("path", { d: "M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z" }) }), Ps = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ h("path", { d: "M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z" }) }), cg = () => /* @__PURE__ */ h(
2538
2538
  "svg",
2539
2539
  {
2540
2540
  className: "icon",
@@ -3364,7 +3364,7 @@ const Uu = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "
3364
3364
  )
3365
3365
  ]
3366
3366
  }
3367
- ), Pg = () => /* @__PURE__ */ h(
3367
+ ), Rg = () => /* @__PURE__ */ h(
3368
3368
  "svg",
3369
3369
  {
3370
3370
  className: "icon",
@@ -3390,7 +3390,7 @@ const Uu = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "
3390
3390
  )
3391
3391
  ]
3392
3392
  }
3393
- ), Rg = () => /* @__PURE__ */ h(
3393
+ ), Pg = () => /* @__PURE__ */ h(
3394
3394
  "svg",
3395
3395
  {
3396
3396
  className: "icon",
@@ -3590,7 +3590,7 @@ const Uu = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "
3590
3590
  }
3591
3591
  ), Wg = ({ text: n }) => {
3592
3592
  const [e, t] = j(n), i = F(null);
3593
- return R(() => (i.current && clearTimeout(i.current), i.current = setTimeout(() => {
3593
+ return P(() => (i.current && clearTimeout(i.current), i.current = setTimeout(() => {
3594
3594
  t(n);
3595
3595
  }, 100), () => {
3596
3596
  i.current && clearTimeout(i.current);
@@ -3709,7 +3709,17 @@ const Uu = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "
3709
3709
  outputTokens: "Output tokens",
3710
3710
  toolCallCount: "Tool calls",
3711
3711
  notCounted: "Not counted",
3712
- notCalled: "Not called"
3712
+ notCalled: "Not called",
3713
+ noResearchContent: "There is currently no research content available",
3714
+ light: "Light",
3715
+ dark: "Dark",
3716
+ generateVisualReport: "Generate visual report",
3717
+ sourceMaterial: "Find the source of {docCount} article information",
3718
+ searchKeyword: "Search keywords: {keyword}",
3719
+ deepResearch: "Depth research report",
3720
+ textReport: "Text report",
3721
+ deepResearchReport: "In depth research report",
3722
+ noTextReportContent: "No text report content available at the moment"
3713
3723
  }, qg = {
3714
3724
  disabled: "禁用",
3715
3725
  enable: "启用",
@@ -3824,7 +3834,17 @@ const Uu = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "
3824
3834
  outputTokens: "输出Token消耗",
3825
3835
  toolCallCount: "工具调用次数",
3826
3836
  notCounted: "未统计",
3827
- notCalled: "未调用"
3837
+ notCalled: "未调用",
3838
+ noResearchContent: "暂无研究内容",
3839
+ light: "亮色",
3840
+ dark: "暗色",
3841
+ generateVisualReport: "生成可视化报告",
3842
+ sourceMaterial: "找到 {docCount} 篇资料来源",
3843
+ searchKeyword: "搜索关键词:{keyword}",
3844
+ deepResearch: "深度研报",
3845
+ textReport: "文本报告",
3846
+ deepResearchReport: "深度研究报告",
3847
+ noTextReportContent: "暂无文本报告内容"
3828
3848
  };
3829
3849
  class Kg {
3830
3850
  constructor() {
@@ -3892,7 +3912,7 @@ const To = (n) => {
3892
3912
  behavior: "auto"
3893
3913
  });
3894
3914
  };
3895
- R(() => {
3915
+ P(() => {
3896
3916
  if (e.beginTime) {
3897
3917
  const d = e.endTime || Date.now();
3898
3918
  r.value = ((d - e.beginTime) / 1e3).toFixed(1);
@@ -3989,7 +4009,7 @@ const Gg = (n) => {
3989
4009
  i.value = !1;
3990
4010
  }, 2e3));
3991
4011
  };
3992
- R(() => () => {
4012
+ P(() => () => {
3993
4013
  r && clearTimeout(r);
3994
4014
  }, []);
3995
4015
  const a = (f) => typeof f == "string" ? f.includes("Failed") || f.includes("Error") || f.includes("ERR_") ? '<span class="error">"'.concat(f, '"</span>') : '<span class="string">"'.concat(f, '"</span>') : typeof f == "number" ? '<span class="number">'.concat(f, "</span>") : typeof f == "boolean" ? '<span class="boolean">'.concat(f, "</span>") : f === null ? '<span class="null">null</span>' : "", l = (f, p = 0) => {
@@ -3998,21 +4018,21 @@ const Gg = (n) => {
3998
4018
  if (f.length === 0)
3999
4019
  return ["".concat(m, '<span class="array">[]</span>')];
4000
4020
  v.push("".concat(m, '<span class="array">[</span>')), f.forEach((y, g) => {
4001
- const b = l(y, p + 1), w = g < f.length - 1 ? "," : "";
4002
- typeof y == "object" && y !== null ? (v.push(...b.slice(0, -1)), v.push("".concat(b[b.length - 1]).concat(w))) : v.push("".concat(b[0]).concat(w));
4021
+ const b = l(y, p + 1), k = g < f.length - 1 ? "," : "";
4022
+ typeof y == "object" && y !== null ? (v.push(...b.slice(0, -1)), v.push("".concat(b[b.length - 1]).concat(k))) : v.push("".concat(b[0]).concat(k));
4003
4023
  }), v.push("".concat(m, '<span class="array">]</span>'));
4004
4024
  } else if (typeof f == "object" && f !== null) {
4005
4025
  const y = Object.keys(f);
4006
4026
  if (y.length === 0)
4007
4027
  return ["".concat(m, '<span class="property">{}</span>')];
4008
4028
  v.push("".concat(m, '<span class="property">{</span>')), y.forEach((g, b) => {
4009
- const w = f[g], k = b < y.length - 1 ? "," : "", x = '<span class="json-key">"'.concat(g, '":</span>');
4010
- if (typeof w == "object" && w !== null) {
4011
- const T = l(w, p + 1);
4012
- v.push("".concat(m, " ").concat(x, " ").concat(T[0].trim())), T.length > 1 && (v.push(...T.slice(1, -1)), v.push("".concat(T[T.length - 1]).concat(k)));
4029
+ const k = f[g], w = b < y.length - 1 ? "," : "", x = '<span class="json-key">"'.concat(g, '":</span>');
4030
+ if (typeof k == "object" && k !== null) {
4031
+ const T = l(k, p + 1);
4032
+ v.push("".concat(m, " ").concat(x, " ").concat(T[0].trim())), T.length > 1 && (v.push(...T.slice(1, -1)), v.push("".concat(T[T.length - 1]).concat(w)));
4013
4033
  } else {
4014
- const T = a(w);
4015
- v.push("".concat(m, " ").concat(x, " ").concat(T).concat(k));
4034
+ const T = a(k);
4035
+ v.push("".concat(m, " ").concat(x, " ").concat(T).concat(w));
4016
4036
  }
4017
4037
  }), v.push("".concat(m, '<span class="property">}</span>'));
4018
4038
  } else
@@ -4081,19 +4101,19 @@ const Xg = (n) => {
4081
4101
  }, 2e3));
4082
4102
  }, l = (g) => {
4083
4103
  const b = /\[(.+?)\]\((.+?)\)/g;
4084
- return g.replace(b, (w, k, x) => '<a href="'.concat(x, '">').concat(k, "</a>"));
4104
+ return g.replace(b, (k, w, x) => '<a href="'.concat(x, '">').concat(w, "</a>"));
4085
4105
  };
4086
- R(() => {
4087
- var k;
4088
- const g = bf(((k = n.item.result) == null ? void 0 : k.chunks) || []), b = g.filter(
4106
+ P(() => {
4107
+ var w;
4108
+ const g = bf(((w = n.item.result) == null ? void 0 : w.chunks) || []), b = g.filter(
4089
4109
  (x) => x.type === "SOURCE"
4090
- ), w = g.filter(
4110
+ ), k = g.filter(
4091
4111
  (x) => x.type !== "SOURCE"
4092
4112
  );
4093
- w.forEach((x) => {
4113
+ k.forEach((x) => {
4094
4114
  x.type === "CLUSTER" && (x.children = b.filter((T) => T.pid === x.id), x.isExpand = !1);
4095
- }), t.value = w;
4096
- }, [n.item]), R(() => () => {
4115
+ }), t.value = k;
4116
+ }, [n.item]), P(() => () => {
4097
4117
  s && clearTimeout(s);
4098
4118
  }, []);
4099
4119
  const c = (g, b) => {
@@ -4103,7 +4123,7 @@ const Xg = (n) => {
4103
4123
  return /* @__PURE__ */ h(
4104
4124
  "div",
4105
4125
  {
4106
- onClick: (w) => n.onLinkClick(w),
4126
+ onClick: (k) => n.onLinkClick(k),
4107
4127
  dangerouslySetInnerHTML: { __html: b }
4108
4128
  }
4109
4129
  );
@@ -4134,7 +4154,7 @@ const Xg = (n) => {
4134
4154
  g.id
4135
4155
  );
4136
4156
  }, p = (g) => {
4137
- var b, w;
4157
+ var b, k;
4138
4158
  return g.type === "CLUSTER" ? /* @__PURE__ */ h("div", { className: "".concat(e.e("chunk"), " ").concat(e.e("cluster")), children: [
4139
4159
  /* @__PURE__ */ h("div", { className: e.em("cluster", "header"), children: [
4140
4160
  /* @__PURE__ */ h(
@@ -4156,7 +4176,7 @@ const Xg = (n) => {
4156
4176
  "div",
4157
4177
  {
4158
4178
  className: e.em("cluster", "icon"),
4159
- onClick: (k) => c(k, g),
4179
+ onClick: (w) => c(w, g),
4160
4180
  children: [
4161
4181
  /* @__PURE__ */ h(
4162
4182
  Bn,
@@ -4172,7 +4192,7 @@ const Xg = (n) => {
4172
4192
  ]
4173
4193
  }
4174
4194
  ),
4175
- g.isExpand && /* @__PURE__ */ h("div", { className: e.em("cluster", "children"), children: (w = g.children) == null ? void 0 : w.map((k) => f(k)) })
4195
+ g.isExpand && /* @__PURE__ */ h("div", { className: e.em("cluster", "children"), children: (k = g.children) == null ? void 0 : k.map((w) => f(w)) })
4176
4196
  ] }),
4177
4197
  d(g)
4178
4198
  ] }, g.id) : /* @__PURE__ */ h("div", { className: "".concat(e.e("chunk"), " ").concat(e.e("default")), children: [
@@ -4280,7 +4300,7 @@ const Zg = (n) => {
4280
4300
  r.value = !1;
4281
4301
  }, 2e3));
4282
4302
  };
4283
- R(() => () => {
4303
+ P(() => () => {
4284
4304
  s && clearTimeout(s);
4285
4305
  }, []);
4286
4306
  const l = () => {
@@ -4378,7 +4398,7 @@ const Mo = (n) => {
4378
4398
  const { items: e, onLinkClick: t, onCollapseChange: i } = n, r = new z("chat-tool-call"), s = $([]), o = $(!1), a = $(!1), l = (d) => {
4379
4399
  t == null || t(d);
4380
4400
  };
4381
- R(() => {
4401
+ P(() => {
4382
4402
  s.value = e.filter((d) => d), a.value = e.length > 4;
4383
4403
  }, [e]);
4384
4404
  const c = we(() => a.value && !o.value ? s.value.slice(0, 4) : s.value), u = () => {
@@ -4413,7 +4433,7 @@ const fi = new z("chat-search"), _o = (n) => {
4413
4433
  onChange: s,
4414
4434
  onEnter: o
4415
4435
  } = n, [a, l] = j(!1), c = F(null);
4416
- R(() => {
4436
+ P(() => {
4417
4437
  var f;
4418
4438
  r && ((f = c.current) == null || f.focus());
4419
4439
  }, []);
@@ -4472,14 +4492,14 @@ const ye = new z("chat-single-select"), ed = (n) => {
4472
4492
  icon: c,
4473
4493
  onChange: u,
4474
4494
  onSearch: d
4475
- } = n, f = !!t.length, p = F(null), m = F(null), v = $(""), [y, g] = j(e), [b, w] = j(t), [k, x] = j(!1), [T, M] = j(!1), O = ((ct = t.find((U) => U.value === y)) == null ? void 0 : ct.label) || l;
4476
- R(() => {
4477
- k === !1 && (v.value = "", w(t));
4478
- }, [k]), R(() => {
4495
+ } = n, f = !!t.length, p = F(null), m = F(null), v = $(""), [y, g] = j(e), [b, k] = j(t), [w, x] = j(!1), [T, M] = j(!1), O = ((ct = t.find((U) => U.value === y)) == null ? void 0 : ct.label) || l;
4496
+ P(() => {
4497
+ w === !1 && (v.value = "", k(t));
4498
+ }, [w]), P(() => {
4479
4499
  g(e);
4480
- }, [e]), R(() => {
4481
- w(t);
4482
- }, [t]), R(() => {
4500
+ }, [e]), P(() => {
4501
+ k(t);
4502
+ }, [t]), P(() => {
4483
4503
  const U = (ae) => {
4484
4504
  var ri, Qo;
4485
4505
  !f || s || (ri = m.current) != null && ri.contains(ae.target) || ((Qo = p.current) != null && Qo.contains(ae.target) ? x((mf) => !mf) : x(!1));
@@ -4498,9 +4518,9 @@ const ye = new z("chat-single-select"), ed = (n) => {
4498
4518
  let ae = [];
4499
4519
  d ? ae = await d(U) : ae = t.filter(
4500
4520
  (ri) => ri.label.toLowerCase().includes(U.toLowerCase())
4501
- ), w(ae);
4521
+ ), k(ae);
4502
4522
  } catch (ae) {
4503
- w([]), console.error(C.t.value("searchFailed"), ae);
4523
+ k([]), console.error(C.t.value("searchFailed"), ae);
4504
4524
  } finally {
4505
4525
  M(!1);
4506
4526
  }
@@ -4521,7 +4541,7 @@ const ye = new z("chat-single-select"), ed = (n) => {
4521
4541
  /* @__PURE__ */ h(
4522
4542
  "div",
4523
4543
  {
4524
- className: "".concat(ye.e("button"), " ").concat(o ? ye.em("button", "border") : "", " ").concat(ye.is("focus", k)),
4544
+ className: "".concat(ye.e("button"), " ").concat(o ? ye.em("button", "border") : "", " ").concat(ye.is("focus", w)),
4525
4545
  ref: p,
4526
4546
  children: [
4527
4547
  c ? /* @__PURE__ */ h(
@@ -4536,13 +4556,13 @@ const ye = new z("chat-single-select"), ed = (n) => {
4536
4556
  "span",
4537
4557
  {
4538
4558
  className: "".concat(ye.em("button", "icon"), " ").concat(ye.em("button", "suffix")),
4539
- children: k ? Zu() : Ju()
4559
+ children: w ? Zu() : Ju()
4540
4560
  }
4541
4561
  ) : null
4542
4562
  ]
4543
4563
  }
4544
4564
  ),
4545
- k ? /* @__PURE__ */ h("div", { className: ye.e("dropdown"), ref: m, style: i, children: [
4565
+ w ? /* @__PURE__ */ h("div", { className: ye.e("dropdown"), ref: m, style: i, children: [
4546
4566
  a ? /* @__PURE__ */ h("div", { className: ye.em("dropdown", "search"), children: /* @__PURE__ */ h(
4547
4567
  _o,
4548
4568
  {
@@ -4567,14 +4587,14 @@ const xe = new z("chat-multiple-select"), e2 = (n) => {
4567
4587
  icon: o,
4568
4588
  onChange: a,
4569
4589
  onSearch: l
4570
- } = n, c = F(null), u = F(null), d = $(""), [f, p] = j(!1), [m, v] = j(!1), [y, g] = j(e || []), [b, w] = j(t);
4571
- R(() => {
4572
- f === !1 && (d.value = "", w(t));
4573
- }, [f]), R(() => {
4590
+ } = n, c = F(null), u = F(null), d = $(""), [f, p] = j(!1), [m, v] = j(!1), [y, g] = j(e || []), [b, k] = j(t);
4591
+ P(() => {
4592
+ f === !1 && (d.value = "", k(t));
4593
+ }, [f]), P(() => {
4574
4594
  g(e || []);
4575
- }, [e]), R(() => {
4576
- w(t);
4577
- }, [t]), R(() => {
4595
+ }, [e]), P(() => {
4596
+ k(t);
4597
+ }, [t]), P(() => {
4578
4598
  const E = (V) => {
4579
4599
  var W, oe;
4580
4600
  V.stopPropagation(), !(V.target && ((W = u.current) != null && W.contains(V.target))) && ((oe = c.current) != null && oe.contains(V.target) ? p((ct) => !ct) : p(!1));
@@ -4583,7 +4603,7 @@ const xe = new z("chat-multiple-select"), e2 = (n) => {
4583
4603
  document.removeEventListener("mousedown", E);
4584
4604
  };
4585
4605
  }, []);
4586
- const k = (E) => {
4606
+ const w = (E) => {
4587
4607
  const W = y.includes(E.value) ? y.filter((oe) => oe !== E.value) : [...y, E.value];
4588
4608
  g(W), a == null || a(W);
4589
4609
  }, x = (E) => {
@@ -4592,11 +4612,11 @@ const xe = new z("chat-multiple-select"), e2 = (n) => {
4592
4612
  try {
4593
4613
  v(!0);
4594
4614
  let V = [];
4595
- l ? V = await l(E) : V = t.filter(
4615
+ l ? (v(!0), V = await l(E), v(!1)) : V = t.filter(
4596
4616
  (W) => W.label.toLowerCase().includes(E.toLowerCase())
4597
- ), w(V);
4617
+ ), k(V);
4598
4618
  } catch (V) {
4599
- w([]), console.error(C.t.value("searchFailed"), V);
4619
+ k([]), console.error(C.t.value("searchFailed"), V);
4600
4620
  } finally {
4601
4621
  v(!1);
4602
4622
  }
@@ -4608,7 +4628,7 @@ const xe = new z("chat-multiple-select"), e2 = (n) => {
4608
4628
  {
4609
4629
  title: E.label,
4610
4630
  className: xe.em("dropdown", "item"),
4611
- onClick: () => k(E),
4631
+ onClick: () => w(E),
4612
4632
  children: [
4613
4633
  /* @__PURE__ */ h(
4614
4634
  "input",
@@ -4691,8 +4711,8 @@ function Za(n, e) {
4691
4711
  (Za.prototype = new Be()).isPureReactComponent = !0, Za.prototype.shouldComponentUpdate = function(n, e) {
4692
4712
  return Ya(this.props, n) || Ya(this.state, e);
4693
4713
  };
4694
- var Qa = P.__b;
4695
- P.__b = function(n) {
4714
+ var Qa = R.__b;
4715
+ R.__b = function(n) {
4696
4716
  n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Qa && Qa(n);
4697
4717
  };
4698
4718
  var t2 = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
@@ -4703,8 +4723,8 @@ function n2(n) {
4703
4723
  }
4704
4724
  return e.$$typeof = t2, e.render = n, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", e;
4705
4725
  }
4706
- var i2 = P.__e;
4707
- P.__e = function(n, e, t, i) {
4726
+ var i2 = R.__e;
4727
+ R.__e = function(n, e, t, i) {
4708
4728
  if (n.then) {
4709
4729
  for (var r, s = e; s = s.__; )
4710
4730
  if ((r = s.__c) && r.__c)
@@ -4712,7 +4732,7 @@ P.__e = function(n, e, t, i) {
4712
4732
  }
4713
4733
  i2(n, e, t, i);
4714
4734
  };
4715
- var el = P.unmount;
4735
+ var el = R.unmount;
4716
4736
  function nd(n, e, t) {
4717
4737
  return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
4718
4738
  typeof i.__c == "function" && i.__c();
@@ -4735,7 +4755,7 @@ function rd(n) {
4735
4755
  function pi() {
4736
4756
  this.i = null, this.l = null;
4737
4757
  }
4738
- P.unmount = function(n) {
4758
+ R.unmount = function(n) {
4739
4759
  var e = n.__c;
4740
4760
  e && e.__R && e.__R(), e && 32 & n.__u && (n.type = null), el && el(n);
4741
4761
  }, (qr.prototype = new Be()).__c = function(n, e) {
@@ -4837,7 +4857,7 @@ Be.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceive
4837
4857
  Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
4838
4858
  } });
4839
4859
  });
4840
- var nl = P.event;
4860
+ var nl = R.event;
4841
4861
  function f2() {
4842
4862
  }
4843
4863
  function p2() {
@@ -4846,13 +4866,13 @@ function p2() {
4846
4866
  function m2() {
4847
4867
  return this.defaultPrevented;
4848
4868
  }
4849
- P.event = function(n) {
4869
+ R.event = function(n) {
4850
4870
  return nl && (n = nl(n)), n.persist = f2, n.isPropagationStopped = p2, n.isDefaultPrevented = m2, n.nativeEvent = n;
4851
4871
  };
4852
4872
  var g2 = { enumerable: !1, configurable: !0, get: function() {
4853
4873
  return this.class;
4854
- } }, il = P.vnode;
4855
- P.vnode = function(n) {
4874
+ } }, il = R.vnode;
4875
+ R.vnode = function(n) {
4856
4876
  typeof n.type == "string" && function(e) {
4857
4877
  var t = e.props, i = e.type, r = {}, s = i.indexOf("-") === -1;
4858
4878
  for (var o in t) {
@@ -4869,12 +4889,12 @@ P.vnode = function(n) {
4869
4889
  })), t.class && !t.className ? (r.class = t.class, Object.defineProperty(r, "className", g2)) : (t.className && !t.class || t.class && t.className) && (r.class = r.className = t.className), e.props = r;
4870
4890
  }(n), n.$$typeof = a2, il && il(n);
4871
4891
  };
4872
- var rl = P.__r;
4873
- P.__r = function(n) {
4892
+ var rl = R.__r;
4893
+ R.__r = function(n) {
4874
4894
  rl && rl(n), n.__c;
4875
4895
  };
4876
- var sl = P.diffed;
4877
- P.diffed = function(n) {
4896
+ var sl = R.diffed;
4897
+ R.diffed = function(n) {
4878
4898
  sl && sl(n);
4879
4899
  var e = n.props, t = n.__e;
4880
4900
  t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
@@ -4892,62 +4912,62 @@ const Vi = ({
4892
4912
  // 接收行为事件回调
4893
4913
  }) => {
4894
4914
  const l = new z("pop"), c = yo(Tr), [u, d] = j(s || !1), f = F(null), p = F(null), m = F(null);
4895
- R(() => {
4915
+ P(() => {
4896
4916
  s !== void 0 && d(s);
4897
- }, [s]), R(() => (p.current || (p.current = document.createElement("div"), p.current.className = l.b("content-container"), document.body.appendChild(p.current)), () => {
4917
+ }, [s]), P(() => (p.current || (p.current = document.createElement("div"), p.current.className = l.b("content-container"), document.body.appendChild(p.current)), () => {
4898
4918
  p.current && document.body.removeChild(p.current);
4899
- }), []), R(() => {
4900
- const k = (x) => {
4919
+ }), []), P(() => {
4920
+ const w = (x) => {
4901
4921
  f.current && !f.current.contains(x.target) && !x.target.closest(".".concat(l.b())) && !x.target.closest(".ibiz-quick-edit") && !x.target.closest(".ibiz-picker__transfer") && (d(!1), o == null || o(!1));
4902
4922
  };
4903
- return u && document.addEventListener("mousedown", k), () => {
4904
- document.removeEventListener("mousedown", k);
4923
+ return u && document.addEventListener("mousedown", w), () => {
4924
+ document.removeEventListener("mousedown", w);
4905
4925
  };
4906
4926
  }, [u, o]);
4907
4927
  const v = () => {
4908
4928
  if (!f.current)
4909
4929
  return {};
4910
- const k = f.current.getBoundingClientRect(), x = {
4930
+ const w = f.current.getBoundingClientRect(), x = {
4911
4931
  position: "absolute",
4912
4932
  zIndex: c.zIndex + 1
4913
4933
  }, T = {
4914
4934
  bottom: {
4915
- top: k.bottom + window.scrollY,
4916
- left: k.left + window.scrollX
4935
+ top: w.bottom + window.scrollY,
4936
+ left: w.left + window.scrollX
4917
4937
  },
4918
4938
  top: {
4919
- bottom: window.innerHeight - k.top + window.scrollY,
4920
- left: k.left + window.scrollX
4939
+ bottom: window.innerHeight - w.top + window.scrollY,
4940
+ left: w.left + window.scrollX
4921
4941
  },
4922
4942
  left: {
4923
- top: k.top + window.scrollY,
4924
- right: window.innerWidth - k.left + window.scrollX
4943
+ top: w.top + window.scrollY,
4944
+ right: window.innerWidth - w.left + window.scrollX
4925
4945
  },
4926
4946
  right: {
4927
- top: k.top + window.scrollY,
4928
- left: k.right + window.scrollX
4947
+ top: w.top + window.scrollY,
4948
+ left: w.right + window.scrollX
4929
4949
  },
4930
4950
  "top-left": {
4931
- bottom: window.innerHeight - k.top + window.scrollY,
4932
- right: window.innerWidth - k.left + window.scrollX
4951
+ bottom: window.innerHeight - w.top + window.scrollY,
4952
+ right: window.innerWidth - w.left + window.scrollX
4933
4953
  }
4934
4954
  };
4935
4955
  return { ...x, ...T[r] };
4936
4956
  }, y = () => {
4937
4957
  m.current && n === "hover" && (clearTimeout(m.current), m.current = null);
4938
- }, g = (k) => {
4958
+ }, g = (w) => {
4939
4959
  if (n === "click") {
4940
- k.stopPropagation();
4960
+ w.stopPropagation();
4941
4961
  const x = !u;
4942
4962
  d(x), o == null || o(x);
4943
4963
  }
4944
- }, b = (k) => {
4964
+ }, b = (w) => {
4945
4965
  if (n === "hover") {
4946
- k.stopPropagation(), y();
4966
+ w.stopPropagation(), y();
4947
4967
  const x = !0;
4948
4968
  d(x), o == null || o(x);
4949
4969
  }
4950
- }, w = () => {
4970
+ }, k = () => {
4951
4971
  n === "hover" && (y(), m.current = setTimeout(() => {
4952
4972
  d(!1), o == null || o(!1);
4953
4973
  }, 100));
@@ -4958,14 +4978,14 @@ const Vi = ({
4958
4978
  {
4959
4979
  className: "".concat(l.b("trigger-element")),
4960
4980
  ref: f,
4961
- onClick: (k) => {
4962
- g(k);
4981
+ onClick: (w) => {
4982
+ g(w);
4963
4983
  },
4964
- onMouseEnter: (k) => {
4965
- b(k);
4984
+ onMouseEnter: (w) => {
4985
+ b(w);
4966
4986
  },
4967
- onMouseLeave: (k) => {
4968
- k.stopPropagation(), w();
4987
+ onMouseLeave: (w) => {
4988
+ w.stopPropagation(), k();
4969
4989
  },
4970
4990
  children: e
4971
4991
  }
@@ -4977,20 +4997,20 @@ const Vi = ({
4977
4997
  className: "".concat(l.b(), " pop-").concat(r),
4978
4998
  style: v(),
4979
4999
  onMouseEnter: y,
4980
- onMouseLeave: w,
4981
- children: i || (t == null ? void 0 : t.map((k) => /* @__PURE__ */ h(
5000
+ onMouseLeave: k,
5001
+ children: i || (t == null ? void 0 : t.map((w) => /* @__PURE__ */ h(
4982
5002
  "div",
4983
5003
  {
4984
5004
  className: l.e("item"),
4985
5005
  onMouseDown: (x) => {
4986
- x.stopPropagation(), a == null || a(k.id, x);
5006
+ x.stopPropagation(), a == null || a(w.id, x);
4987
5007
  },
4988
5008
  children: [
4989
- k.icon,
4990
- /* @__PURE__ */ h("div", { className: l.em("item", "caption"), children: k.caption })
5009
+ w.icon,
5010
+ /* @__PURE__ */ h("div", { className: l.em("item", "caption"), children: w.caption })
4991
5011
  ]
4992
5012
  },
4993
- k.id
5013
+ w.id
4994
5014
  )))
4995
5015
  }
4996
5016
  ),
@@ -5113,35 +5133,35 @@ const Y = new z("messsage-toolbar"), v2 = (n) => {
5113
5133
  newPosition: 0,
5114
5134
  startPosition: 0
5115
5135
  }), u = we(() => "".concat((a.value - t) / (i - t) * 100, "%"));
5116
- R(() => {
5136
+ P(() => {
5117
5137
  a.value = n.value;
5118
5138
  }, [n.value]);
5119
5139
  const d = (g) => {
5120
- let b, w;
5121
- return g.type.startsWith("touch") ? (w = g.touches[0].clientY, b = g.touches[0].clientX) : (w = g.clientY, b = g.clientX), {
5140
+ let b, k;
5141
+ return g.type.startsWith("touch") ? (k = g.touches[0].clientY, b = g.touches[0].clientX) : (k = g.clientY, b = g.clientX), {
5122
5142
  clientX: b,
5123
- clientY: w
5143
+ clientY: k
5124
5144
  };
5125
5145
  }, f = async (g) => {
5126
5146
  if (g === null || Number.isNaN(+g))
5127
5147
  return;
5128
5148
  g < 0 ? g = 0 : g > 100 && (g = 100);
5129
5149
  const b = 100 / ((i - t) / r);
5130
- let k = Math.round(g / b) * b * (i - t) * 0.01 + t;
5131
- k = Number.parseFloat(k.toFixed(l)), k !== n.value && s(k);
5150
+ let w = Math.round(g / b) * b * (i - t) * 0.01 + t;
5151
+ w = Number.parseFloat(w.toFixed(l)), w !== n.value && s(w);
5132
5152
  }, p = (g) => {
5133
- const { clientX: b } = d(g), w = Number.parseFloat(u.value);
5153
+ const { clientX: b } = d(g), k = Number.parseFloat(u.value);
5134
5154
  Object.assign(c.current, {
5135
5155
  dragging: !0,
5136
5156
  startX: b,
5137
- startPosition: w,
5138
- newPosition: w
5157
+ startPosition: k,
5158
+ newPosition: k
5139
5159
  });
5140
5160
  }, m = (g) => {
5141
5161
  if (!c.current.dragging)
5142
5162
  return;
5143
- const { clientX: b } = d(g), w = o.current.parentElement.clientWidth, k = (b - c.current.startX) / w * 100;
5144
- c.current.newPosition = c.current.startPosition + k, f(c.current.newPosition);
5163
+ const { clientX: b } = d(g), k = o.current.parentElement.clientWidth, w = (b - c.current.startX) / k * 100;
5164
+ c.current.newPosition = c.current.startPosition + w, f(c.current.newPosition);
5145
5165
  }, v = () => {
5146
5166
  c.current.dragging && (c.current.dragging = !1, window.removeEventListener("mousemove", m), window.removeEventListener("touchmove", m), window.removeEventListener("mouseup", v), window.removeEventListener("touchend", v));
5147
5167
  }, y = (g) => {
@@ -5177,17 +5197,17 @@ const mi = new z("chat-slider"), al = (n) => {
5177
5197
  width: "".concat(100 * (u.value - t) / (i - t), "%"),
5178
5198
  left: "0%"
5179
5199
  }));
5180
- R(() => {
5200
+ P(() => {
5181
5201
  r !== void 0 && (u.value = r);
5182
5202
  }, [r]);
5183
5203
  const f = (m) => {
5184
5204
  u.value = m, a == null || a(m);
5185
5205
  }, p = (m) => {
5186
- var w, k, x;
5206
+ var k, w, x;
5187
5207
  if (!c.current || c.current.state.current.dragging)
5188
5208
  return;
5189
5209
  let v = 0;
5190
- const y = (x = (k = (w = m.touches) == null ? void 0 : w.item(0)) == null ? void 0 : k.clientX) != null ? x : m.clientX, { left: g, width: b } = l.current.getBoundingClientRect();
5210
+ const y = (x = (w = (k = m.touches) == null ? void 0 : k.item(0)) == null ? void 0 : w.clientX) != null ? x : m.clientX, { left: g, width: b } = l.current.getBoundingClientRect();
5191
5211
  v = (y - g) / b * 100, !(v < 0 || v > 100) && (c.current.setPosition(v), setTimeout(() => {
5192
5212
  c.current.onButtonDown(m);
5193
5213
  }, 0));
@@ -5221,7 +5241,7 @@ const mi = new z("chat-slider"), al = (n) => {
5221
5241
  };
5222
5242
  const gi = new z("chat-switch"), b2 = (n) => {
5223
5243
  const { value: e, className: t = "", showText: i = !1, onChange: r } = n, [s, o] = j(void 0), [a, l] = j(e);
5224
- R(() => {
5244
+ P(() => {
5225
5245
  l(e);
5226
5246
  }, [e]);
5227
5247
  const c = () => {
@@ -5274,18 +5294,18 @@ const We = new z("chat-step-item"), w2 = (n) => {
5274
5294
  const E = $u.parse(T).toolCalls || [];
5275
5295
  T = T.replace(/<tool_call>[\s\S]*?<\/tool_call>/g, ""), f.value.description = x || "", u.value = T || "", d.value = E;
5276
5296
  };
5277
- R(() => {
5297
+ P(() => {
5278
5298
  g(), y(), b(), v();
5279
- }, []), R(() => {
5299
+ }, []), P(() => {
5280
5300
  setTimeout(() => {
5281
5301
  g();
5282
5302
  }, 0);
5283
5303
  }, [n.element.content]);
5284
- const w = () => {
5304
+ const k = () => {
5285
5305
  a(!o), setTimeout(() => {
5286
5306
  g();
5287
5307
  }, 0);
5288
- }, k = (x) => {
5308
+ }, w = (x) => {
5289
5309
  setTimeout(() => {
5290
5310
  g();
5291
5311
  }, 0);
@@ -5298,8 +5318,8 @@ const We = new z("chat-step-item"), w2 = (n) => {
5298
5318
  style: { "--ibiz-chat-step-item-height": "".concat(l, "px") },
5299
5319
  children: [
5300
5320
  /* @__PURE__ */ h("div", { className: "".concat(We.e("left")), children: /* @__PURE__ */ h("div", { className: "".concat(We.e("icon")), children: [
5301
- e.status === "success" && /* @__PURE__ */ h(Rg, {}),
5302
- e.status === "failed" && /* @__PURE__ */ h(Pg, {}),
5321
+ e.status === "success" && /* @__PURE__ */ h(Pg, {}),
5322
+ e.status === "failed" && /* @__PURE__ */ h(Rg, {}),
5303
5323
  e.status === "pending" && /* @__PURE__ */ h(bg, {})
5304
5324
  ] }) }),
5305
5325
  /* @__PURE__ */ h(
@@ -5322,7 +5342,7 @@ const We = new z("chat-step-item"), w2 = (n) => {
5322
5342
  items: d.value,
5323
5343
  controller: n.controller,
5324
5344
  onLinkClick: n.onLinkClick,
5325
- onCollapseChange: k
5345
+ onCollapseChange: w
5326
5346
  }
5327
5347
  ) }),
5328
5348
  f.value.description && o && /* @__PURE__ */ h("div", { className: "".concat(We.e("content-think-container")), children: /* @__PURE__ */ h(
@@ -5341,7 +5361,7 @@ const We = new z("chat-step-item"), w2 = (n) => {
5341
5361
  {
5342
5362
  className: "".concat(We.e("toggle-btn")),
5343
5363
  onClick: () => {
5344
- w();
5364
+ k();
5345
5365
  },
5346
5366
  children: o ? C.t.value("foldUp") : C.t.value("expandAll")
5347
5367
  }
@@ -5357,7 +5377,7 @@ const We = new z("chat-step-item"), w2 = (n) => {
5357
5377
  };
5358
5378
  const vi = new z("chat-step"), sd = (n) => {
5359
5379
  const { items: e } = n, t = $(!1), i = $(!0), r = $([]);
5360
- R(() => {
5380
+ P(() => {
5361
5381
  t.value = e.length > 1, r.value = t.value && !i.value ? [e[e.length - 1]] : e;
5362
5382
  }, [e]);
5363
5383
  const s = () => {
@@ -5437,8 +5457,8 @@ const Zt = new z("common-material"), k2 = (n) => {
5437
5457
  const y = u.downloadContext.split(";").reduce(
5438
5458
  (g, b) => {
5439
5459
  if (b.trim()) {
5440
- const [w, k] = b.split(":");
5441
- w && k && (g[w.trim()] = k.trim());
5460
+ const [k, w] = b.split(":");
5461
+ k && w && (g[k.trim()] = w.trim());
5442
5462
  }
5443
5463
  return g;
5444
5464
  },
@@ -5511,11 +5531,11 @@ const Kr = new z("chat-input-material-item"), dr = (n) => {
5511
5531
  };
5512
5532
  const _t = new z("markdown-message"), x2 = (n) => {
5513
5533
  const { message: e, size: t } = n, i = F(null), r = $(null), s = $({ resources: [], remainingText: "", hasResources: !1 }), o = (g) => {
5514
- const { resources: b, remainingText: w, hasResources: k, error: x } = ln.parseMixedContent(g);
5534
+ const { resources: b, remainingText: k, hasResources: w, error: x } = ln.parseMixedContent(g);
5515
5535
  s.value = {
5516
5536
  resources: b,
5517
- remainingText: w,
5518
- hasResources: k,
5537
+ remainingText: k,
5538
+ hasResources: w,
5519
5539
  error: x
5520
5540
  };
5521
5541
  }, a = Ie(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), l = Ie(() => e.state === 20 && e.completed === !0, [e.state, e.completed]);
@@ -5541,25 +5561,25 @@ const _t = new z("markdown-message"), x2 = (n) => {
5541
5561
  }, p = (g, b) => {
5542
5562
  n.controller.handleUIActionClick(n.message, g, b);
5543
5563
  }, m = (g) => {
5544
- const b = g.indexOf("<think>"), w = g.indexOf("</think>");
5545
- let k = "", x = "", T = !1;
5546
- return w === -1 ? (T = !1, k = g.slice(b + 7), x = "") : (T = !0, k = g.slice(b + 7, w), x = g.slice(w + 8)), { isThoughtCompleted: T, thoughtContent: k, answerContent: x };
5564
+ const b = g.indexOf("<think>"), k = g.indexOf("</think>");
5565
+ let w = "", x = "", T = !1;
5566
+ return k === -1 ? (T = !1, w = g.slice(b + 7), x = "") : (T = !0, w = g.slice(b + 7, k), x = g.slice(k + 8)), { isThoughtCompleted: T, thoughtContent: w, answerContent: x };
5547
5567
  }, v = (g) => {
5548
- const b = g.target, w = b == null ? void 0 : b.closest(
5568
+ const b = g.target, k = b == null ? void 0 : b.closest(
5549
5569
  'a[href^="chunkview://"], a[href^="view://"], a[href^="action://"]'
5550
5570
  );
5551
- if (w) {
5571
+ if (k) {
5552
5572
  g.preventDefault();
5553
- const k = w.getAttribute("href");
5554
- if (k) {
5573
+ const w = k.getAttribute("href");
5574
+ if (w) {
5555
5575
  let x = "";
5556
- switch (k.startsWith("chunkview://") ? x = "chunkview" : k.startsWith("view://") ? x = "view" : k.startsWith("action://") && (x = "action"), x) {
5576
+ switch (w.startsWith("chunkview://") ? x = "chunkview" : w.startsWith("view://") ? x = "view" : w.startsWith("action://") && (x = "action"), x) {
5557
5577
  case "chunkview":
5558
5578
  case "view":
5559
5579
  case "action":
5560
5580
  n.controller.handlePredefinedClick(
5561
5581
  x,
5562
- k,
5582
+ w,
5563
5583
  n.message,
5564
5584
  g
5565
5585
  );
@@ -5572,20 +5592,14 @@ const _t = new z("markdown-message"), x2 = (n) => {
5572
5592
  return !1;
5573
5593
  }
5574
5594
  };
5575
- R(() => {
5595
+ P(() => {
5576
5596
  let g = "";
5577
- if (window.ibiz.log.debug(
5578
- "markdown-message-init------计算前的消息内容",
5579
- e.content
5580
- ), e.content && e.content.indexOf("<think>") !== -1) {
5581
- const { isThoughtCompleted: b, thoughtContent: w, answerContent: k } = m(e.content);
5582
- c(b, w), k && o(k);
5597
+ if (e.content && e.content.indexOf("<think>") !== -1) {
5598
+ const { isThoughtCompleted: b, thoughtContent: k, answerContent: w } = m(e.content);
5599
+ c(b, k), w && o(w);
5583
5600
  } else
5584
5601
  o(e.content);
5585
- g = s.value.remainingText, d(e.suggestions), window.ibiz.log.debug(
5586
- "markdown-message-init------计算后的消息内容",
5587
- g
5588
- ), r.value = new no({
5602
+ g = s.value.remainingText, d(e.suggestions), r.value = new no({
5589
5603
  el: i.current,
5590
5604
  value: g || "",
5591
5605
  editor: {
@@ -5614,28 +5628,19 @@ const _t = new z("markdown-message"), x2 = (n) => {
5614
5628
  onClickPreview: v
5615
5629
  }
5616
5630
  });
5617
- }, []), R(() => {
5618
- if (window.ibiz.log.debug(
5619
- "markdown-message-conentchange------消息内容",
5620
- e.content
5621
- ), window.ibiz.log.debug(
5622
- "markdown-message-conentchange------md编辑器实例",
5623
- r.value
5624
- ), window.ibiz.log.debug("markdown-message------消息内容长度", t), t >= 0 && r.value) {
5631
+ }, []), P(() => {
5632
+ if (t >= 0 && r.value) {
5625
5633
  if (e.content && e.content.indexOf("<think>") !== -1) {
5626
- const { isThoughtCompleted: g, thoughtContent: b, answerContent: w } = m(e.content);
5627
- c(g, b), o(w);
5634
+ const { isThoughtCompleted: g, thoughtContent: b, answerContent: k } = m(e.content);
5635
+ c(g, b), o(k);
5628
5636
  } else
5629
5637
  o(e.content);
5630
- window.ibiz.log.debug(
5631
- "markdown-message-conentchange------设置消息内容",
5632
- s.value.remainingText
5633
- ), r.value.setMarkdown(s.value.remainingText || ""), d(e.suggestions);
5638
+ r.value.setMarkdown(s.value.remainingText || ""), d(e.suggestions);
5634
5639
  }
5635
5640
  }, [e, t]);
5636
5641
  const y = (g) => {
5637
- var w, k;
5638
- const b = (g === "markdown" ? (w = r.value) == null ? void 0 : w.getMarkdown() : (k = i.current) == null ? void 0 : k.innerText) || "";
5642
+ var k, w;
5643
+ const b = (g === "markdown" ? (k = r.value) == null ? void 0 : k.getMarkdown() : (w = i.current) == null ? void 0 : w.innerText) || "";
5639
5644
  n.controller.copyMessage(b, e);
5640
5645
  };
5641
5646
  return /* @__PURE__ */ h("div", { className: "".concat(_t.b(), " ").concat(_t.is("loading", a)), children: [
@@ -6379,29 +6384,29 @@ function zs(n, e, t) {
6379
6384
  let i = n.node(t);
6380
6385
  return dd(i, e.node(t)), i;
6381
6386
  }
6382
- function Rt(n, e) {
6387
+ function Pt(n, e) {
6383
6388
  let t = e.length - 1;
6384
6389
  t >= 0 && n.isText && n.sameMarkup(e[t]) ? e[t] = n.withText(e[t].text + n.text) : e.push(n);
6385
6390
  }
6386
6391
  function An(n, e, t, i) {
6387
6392
  let r = (e || n).node(t), s = 0, o = e ? e.index(t) : r.childCount;
6388
- n && (s = n.index(t), n.depth > t ? s++ : n.textOffset && (Rt(n.nodeAfter, i), s++));
6393
+ n && (s = n.index(t), n.depth > t ? s++ : n.textOffset && (Pt(n.nodeAfter, i), s++));
6389
6394
  for (let a = s; a < o; a++)
6390
- Rt(r.child(a), i);
6391
- e && e.depth == t && e.textOffset && Rt(e.nodeBefore, i);
6395
+ Pt(r.child(a), i);
6396
+ e && e.depth == t && e.textOffset && Pt(e.nodeBefore, i);
6392
6397
  }
6393
6398
  function Lt(n, e) {
6394
6399
  return n.type.checkContent(e), n.copy(e);
6395
6400
  }
6396
6401
  function hd(n, e, t, i, r) {
6397
6402
  let s = n.depth > r && zs(n, e, r + 1), o = i.depth > r && zs(t, i, r + 1), a = [];
6398
- return An(null, n, r, a), s && o && e.index(r) == t.index(r) ? (dd(s, o), Rt(Lt(s, hd(n, e, t, i, r + 1)), a)) : (s && Rt(Lt(s, Wi(n, e, r + 1)), a), An(e, t, r, a), o && Rt(Lt(o, Wi(t, i, r + 1)), a)), An(i, null, r, a), new S(a);
6403
+ return An(null, n, r, a), s && o && e.index(r) == t.index(r) ? (dd(s, o), Pt(Lt(s, hd(n, e, t, i, r + 1)), a)) : (s && Pt(Lt(s, Wi(n, e, r + 1)), a), An(e, t, r, a), o && Pt(Lt(o, Wi(t, i, r + 1)), a)), An(i, null, r, a), new S(a);
6399
6404
  }
6400
6405
  function Wi(n, e, t) {
6401
6406
  let i = [];
6402
6407
  if (An(null, n, t, i), n.depth > t) {
6403
6408
  let r = zs(n, e, t + 1);
6404
- Rt(Lt(r, Wi(n, e, t + 1)), i);
6409
+ Pt(Lt(r, Wi(n, e, t + 1)), i);
6405
6410
  }
6406
6411
  return An(e, null, t, i), new S(i);
6407
6412
  }
@@ -7137,7 +7142,7 @@ class Ht {
7137
7142
  return Ht.empty;
7138
7143
  let r = pd(i);
7139
7144
  i.next && i.err("Unexpected trailing text");
7140
- let s = R2(P2(r));
7145
+ let s = P2(R2(r));
7141
7146
  return L2(s, i), s;
7142
7147
  }
7143
7148
  /**
@@ -7357,7 +7362,7 @@ function $2(n) {
7357
7362
  return n.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
7358
7363
  }
7359
7364
  }
7360
- function P2(n) {
7365
+ function R2(n) {
7361
7366
  let e = [[]];
7362
7367
  return r(s(n, 0), t()), e;
7363
7368
  function t() {
@@ -7428,7 +7433,7 @@ function ul(n, e) {
7428
7433
  }
7429
7434
  }
7430
7435
  }
7431
- function R2(n) {
7436
+ function P2(n) {
7432
7437
  let e = /* @__PURE__ */ Object.create(null);
7433
7438
  return t(ul(n, 0));
7434
7439
  function t(i) {
@@ -8575,15 +8580,15 @@ class Hs {
8575
8580
  return (this.delInfo & Ii) > 0;
8576
8581
  }
8577
8582
  }
8578
- class Pe {
8583
+ class Re {
8579
8584
  /**
8580
8585
  Create a position map. The modifications to the document are
8581
8586
  represented as an array of numbers, in which each group of three
8582
8587
  represents a modified chunk as `[start, oldSize, newSize]`.
8583
8588
  */
8584
8589
  constructor(e, t = !1) {
8585
- if (this.ranges = e, this.inverted = t, !e.length && Pe.empty)
8586
- return Pe.empty;
8590
+ if (this.ranges = e, this.inverted = t, !e.length && Re.empty)
8591
+ return Re.empty;
8587
8592
  }
8588
8593
  /**
8589
8594
  @internal
@@ -8654,7 +8659,7 @@ class Pe {
8654
8659
  map positions in the post-step document to the pre-step document.
8655
8660
  */
8656
8661
  invert() {
8657
- return new Pe(this.ranges, !this.inverted);
8662
+ return new Re(this.ranges, !this.inverted);
8658
8663
  }
8659
8664
  /**
8660
8665
  @internal
@@ -8668,10 +8673,10 @@ class Pe {
8668
8673
  sub-document to a larger document, or vice-versa.
8669
8674
  */
8670
8675
  static offset(e) {
8671
- return e == 0 ? Pe.empty : new Pe(e < 0 ? [0, -e, 0] : [0, 0, e]);
8676
+ return e == 0 ? Re.empty : new Re(e < 0 ? [0, -e, 0] : [0, 0, e]);
8672
8677
  }
8673
8678
  }
8674
- Pe.empty = new Pe([]);
8679
+ Re.empty = new Re([]);
8675
8680
  class Hn {
8676
8681
  /**
8677
8682
  Create a new mapping with the given position maps.
@@ -8787,7 +8792,7 @@ class ke {
8787
8792
  and the new document.
8788
8793
  */
8789
8794
  getMap() {
8790
- return Pe.empty;
8795
+ return Re.empty;
8791
8796
  }
8792
8797
  /**
8793
8798
  Try to merge this step with another one, to be applied directly
@@ -9037,7 +9042,7 @@ class le extends ke {
9037
9042
  return this.structure && js(e, this.from, this.to) ? ne.fail("Structure replace would overwrite content") : ne.fromReplace(e, this.from, this.to, this.slice);
9038
9043
  }
9039
9044
  getMap() {
9040
- return new Pe([this.from, this.to - this.from, this.slice.size]);
9045
+ return new Re([this.from, this.to - this.from, this.slice.size]);
9041
9046
  }
9042
9047
  invert(e) {
9043
9048
  return new le(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
@@ -9092,7 +9097,7 @@ class ue extends ke {
9092
9097
  return i ? ne.fromReplace(e, this.from, this.to, i) : ne.fail("Content does not fit in gap");
9093
9098
  }
9094
9099
  getMap() {
9095
- return new Pe([
9100
+ return new Re([
9096
9101
  this.from,
9097
9102
  this.gapFrom - this.from,
9098
9103
  this.insert,
@@ -9538,7 +9543,7 @@ class c6 {
9538
9543
  let v = a.child(c), y = d.matchType(v.type);
9539
9544
  if (!y)
9540
9545
  break;
9541
- c++, (c > 1 || l == 0 || v.content.size) && (d = y, u.push(Pd(v.mark(f.allowedMarks(v.marks)), c == 1 ? l : 0, c == a.childCount ? p : -1)));
9546
+ c++, (c > 1 || l == 0 || v.content.size) && (d = y, u.push(Rd(v.mark(f.allowedMarks(v.marks)), c == 1 ? l : 0, c == a.childCount ? p : -1)));
9542
9547
  }
9543
9548
  let m = c == a.childCount;
9544
9549
  m || (p = -1), this.placed = Nn(this.placed, t, S.from(u)), this.frontier[t].match = d, m && p < 0 && i && i.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
@@ -9606,11 +9611,11 @@ function Yr(n, e) {
9606
9611
  n = n.firstChild.content;
9607
9612
  return n;
9608
9613
  }
9609
- function Pd(n, e, t) {
9614
+ function Rd(n, e, t) {
9610
9615
  if (e <= 0)
9611
9616
  return n;
9612
9617
  let i = n.content;
9613
- return e > 1 && (i = i.replaceChild(0, Pd(i.firstChild, e - 1, i.childCount == 1 ? t - 1 : 0))), e > 0 && (i = n.type.contentMatch.fillBefore(i).append(i), t <= 0 && (i = i.append(n.type.contentMatch.matchFragment(i).fillBefore(S.empty, !0)))), n.copy(i);
9618
+ return e > 1 && (i = i.replaceChild(0, Rd(i.firstChild, e - 1, i.childCount == 1 ? t - 1 : 0))), e > 0 && (i = n.type.contentMatch.fillBefore(i).append(i), t <= 0 && (i = i.append(n.type.contentMatch.matchFragment(i).fillBefore(S.empty, !0)))), n.copy(i);
9614
9619
  }
9615
9620
  function Zr(n, e, t, i, r) {
9616
9621
  let s = n.node(e), o = r ? n.indexAfter(e) : n.index(e);
@@ -9664,9 +9669,9 @@ function h6(n, e, t, i) {
9664
9669
  for (let v = 0; v < o.length; v++) {
9665
9670
  let y = o[(v + l) % o.length], g = !0;
9666
9671
  y < 0 && (g = !1, y = -y);
9667
- let b = r.node(y - 1), w = r.index(y - 1);
9668
- if (b.canReplaceWith(w, w, m.type, m.marks))
9669
- return n.replace(r.before(y), g ? s.after(y) : t, new N(Rd(i.content, 0, i.openStart, p), p, i.openEnd));
9672
+ let b = r.node(y - 1), k = r.index(y - 1);
9673
+ if (b.canReplaceWith(k, k, m.type, m.marks))
9674
+ return n.replace(r.before(y), g ? s.after(y) : t, new N(Pd(i.content, 0, i.openStart, p), p, i.openEnd));
9670
9675
  }
9671
9676
  }
9672
9677
  let d = n.steps.length;
@@ -9675,10 +9680,10 @@ function h6(n, e, t, i) {
9675
9680
  p < 0 || (e = r.before(p), t = s.after(p));
9676
9681
  }
9677
9682
  }
9678
- function Rd(n, e, t, i, r) {
9683
+ function Pd(n, e, t, i, r) {
9679
9684
  if (e < t) {
9680
9685
  let s = n.firstChild;
9681
- n = n.replaceChild(0, s.copy(Rd(s.content, e + 1, t, i, s)));
9686
+ n = n.replaceChild(0, s.copy(Pd(s.content, e + 1, t, i, s)));
9682
9687
  }
9683
9688
  if (e > i) {
9684
9689
  let s = r.contentMatchAt(0), o = s.fillBefore(n).append(n);
@@ -9736,7 +9741,7 @@ class dn extends ke {
9736
9741
  return ne.fromReplace(e, this.pos, this.pos + 1, new N(S.from(r), 0, t.isLeaf ? 0 : 1));
9737
9742
  }
9738
9743
  getMap() {
9739
- return Pe.empty;
9744
+ return Re.empty;
9740
9745
  }
9741
9746
  invert(e) {
9742
9747
  return new dn(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
@@ -9771,7 +9776,7 @@ class jn extends ke {
9771
9776
  return ne.ok(i);
9772
9777
  }
9773
9778
  getMap() {
9774
- return Pe.empty;
9779
+ return Re.empty;
9775
9780
  }
9776
9781
  invert(e) {
9777
9782
  return new jn(this.attr, e.attrs[this.attr]);
@@ -11092,8 +11097,8 @@ function Ud(n, e, t, i) {
11092
11097
  if (p.canReplace(p.childCount, p.childCount, v.content)) {
11093
11098
  if (t) {
11094
11099
  let g = S.empty;
11095
- for (let w = m.length - 1; w >= 0; w--)
11096
- g = S.from(m[w].copy(g));
11100
+ for (let k = m.length - 1; k >= 0; k--)
11101
+ g = S.from(m[k].copy(g));
11097
11102
  let b = n.tr.step(new ue(e.pos - m.length, e.pos + s.nodeSize, e.pos + y, e.pos + s.nodeSize - y, new N(g, m.length, 0), 0, !0));
11098
11103
  t(b.scrollIntoView());
11099
11104
  }
@@ -11113,7 +11118,7 @@ function qd(n) {
11113
11118
  return r.node(s).isTextblock ? (t && t(e.tr.setSelection(L.create(e.doc, n < 0 ? r.start(s) : r.end(s)))), !0) : !1;
11114
11119
  };
11115
11120
  }
11116
- const P6 = qd(-1), R6 = qd(1);
11121
+ const R6 = qd(-1), P6 = qd(1);
11117
11122
  function L6(n, e = null) {
11118
11123
  return function(t, i) {
11119
11124
  let { $from: r, $to: s } = t.selection, o = r.blockRange(s), a = o && Ed(o, n, e);
@@ -11346,7 +11351,7 @@ function Y6(n, e, t) {
11346
11351
  }
11347
11352
  const Qe = typeof navigator < "u" ? navigator : null, El = typeof document < "u" ? document : null, Tt = Qe && Qe.userAgent || "", Us = /Edge\/(\d+)/.exec(Tt), Kd = /MSIE \d/.exec(Tt), qs = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Tt), Oe = !!(Kd || qs || Us), bt = Kd ? document.documentMode : qs ? +qs[1] : Us ? +Us[1] : 0, Ve = !Oe && /gecko\/(\d+)/i.test(Tt);
11348
11353
  Ve && +(/Firefox\/(\d+)/.exec(Tt) || [0, 0])[1];
11349
- const Ks = !Oe && /Chrome\/(\d+)/.exec(Tt), ce = !!Ks, Jd = Ks ? +Ks[1] : 0, Ce = !Oe && !!Qe && /Apple Computer/.test(Qe.vendor), yn = Ce && (/Mobile\/\w+/.test(Tt) || !!Qe && Qe.maxTouchPoints > 2), Re = yn || (Qe ? /Mac/.test(Qe.platform) : !1), Gd = Qe ? /Win/.test(Qe.platform) : !1, st = /Android \d/.test(Tt), ti = !!El && "webkitFontSmoothing" in El.documentElement.style, Z6 = ti ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
11354
+ const Ks = !Oe && /Chrome\/(\d+)/.exec(Tt), ce = !!Ks, Jd = Ks ? +Ks[1] : 0, Ce = !Oe && !!Qe && /Apple Computer/.test(Qe.vendor), yn = Ce && (/Mobile\/\w+/.test(Tt) || !!Qe && Qe.maxTouchPoints > 2), Pe = yn || (Qe ? /Mac/.test(Qe.platform) : !1), Gd = Qe ? /Win/.test(Qe.platform) : !1, st = /Android \d/.test(Tt), ti = !!El && "webkitFontSmoothing" in El.documentElement.style, Z6 = ti ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
11350
11355
  function Q6(n) {
11351
11356
  let e = n.defaultView && n.defaultView.visualViewport;
11352
11357
  return e ? {
@@ -11683,7 +11688,7 @@ let Al = null, Dl = null, $l = !1;
11683
11688
  function f3(n, e, t) {
11684
11689
  return Al == e && Dl == t ? $l : (Al = e, Dl = t, $l = t == "up" || t == "down" ? u3(n, e, t) : h3(n, e, t));
11685
11690
  }
11686
- const He = 0, Pl = 1, Dt = 2, et = 3;
11691
+ const He = 0, Rl = 1, Dt = 2, et = 3;
11687
11692
  class ni {
11688
11693
  constructor(e, t, i, r) {
11689
11694
  this.parent = e, this.children = t, this.dom = i, this.contentDOM = r, this.dirty = He, i.pmViewDesc = this;
@@ -11998,7 +12003,7 @@ class ni {
11998
12003
  if (i == o ? e <= o && t >= i : e < o && t > i) {
11999
12004
  let a = i + s.border, l = o - s.border;
12000
12005
  if (e >= a && t <= l) {
12001
- this.dirty = e == i || t == o ? Dt : Pl, e == a && t == l && (s.contentLost || s.dom.parentNode != this.contentDOM) ? s.dirty = et : s.markDirty(e - a, t - a);
12006
+ this.dirty = e == i || t == o ? Dt : Rl, e == a && t == l && (s.contentLost || s.dom.parentNode != this.contentDOM) ? s.dirty = et : s.markDirty(e - a, t - a);
12002
12007
  return;
12003
12008
  } else
12004
12009
  s.dirty = s.dom == s.contentDOM && s.dom.parentNode == this.contentDOM && !s.children.length ? Dt : et;
@@ -12010,7 +12015,7 @@ class ni {
12010
12015
  markParentsDirty() {
12011
12016
  let e = 1;
12012
12017
  for (let t = this.parent; t; t = t.parent, e++) {
12013
- let i = e == 1 ? Dt : Pl;
12018
+ let i = e == 1 ? Dt : Rl;
12014
12019
  t.dirty < i && (t.dirty = i);
12015
12020
  }
12016
12021
  }
@@ -12250,7 +12255,7 @@ class wt extends ni {
12250
12255
  return this.node.isAtom;
12251
12256
  }
12252
12257
  }
12253
- function Rl(n, e, t, i, r) {
12258
+ function Pl(n, e, t, i, r) {
12254
12259
  oh(i, e, n);
12255
12260
  let s = new wt(void 0, n, e, t, i, i, i, r, 0);
12256
12261
  return s.contentDOM && s.updateChildren(r, 0), s;
@@ -12366,22 +12371,22 @@ function rh(n, e, t) {
12366
12371
  i = Ll(i), r = !0;
12367
12372
  r && t.trackWrites == n && (t.trackWrites = null);
12368
12373
  }
12369
- const Pn = function(n) {
12374
+ const Rn = function(n) {
12370
12375
  n && (this.nodeName = n);
12371
12376
  };
12372
- Pn.prototype = /* @__PURE__ */ Object.create(null);
12373
- const $t = [new Pn()];
12377
+ Rn.prototype = /* @__PURE__ */ Object.create(null);
12378
+ const $t = [new Rn()];
12374
12379
  function Js(n, e, t) {
12375
12380
  if (n.length == 0)
12376
12381
  return $t;
12377
- let i = t ? $t[0] : new Pn(), r = [i];
12382
+ let i = t ? $t[0] : new Rn(), r = [i];
12378
12383
  for (let s = 0; s < n.length; s++) {
12379
12384
  let o = n[s].type.attrs;
12380
12385
  if (o) {
12381
- o.nodeName && r.push(i = new Pn(o.nodeName));
12386
+ o.nodeName && r.push(i = new Rn(o.nodeName));
12382
12387
  for (let a in o) {
12383
12388
  let l = o[a];
12384
- l != null && (t && r.length == 1 && r.push(i = new Pn(e.isInline ? "span" : "div")), a == "class" ? i.class = (i.class ? i.class + " " : "") + l : a == "style" ? i.style = (i.style ? i.style + ";" : "") + l : a != "nodeName" && (i[a] = l));
12389
+ l != null && (t && r.length == 1 && r.push(i = new Rn(e.isInline ? "span" : "div")), a == "class" ? i.class = (i.class ? i.class + " " : "") + l : a == "style" ? i.style = (i.style ? i.style + ";" : "") + l : a != "nodeName" && (i[a] = l));
12385
12390
  }
12386
12391
  }
12387
12392
  }
@@ -12739,7 +12744,7 @@ function $o(n, e = null) {
12739
12744
  let u = i.resolve(l);
12740
12745
  if (!c) {
12741
12746
  let d = e == "pointer" || n.state.selection.head < a.pos && !s ? 1 : -1;
12742
- c = Po(n, u, a, d);
12747
+ c = Ro(n, u, a, d);
12743
12748
  }
12744
12749
  return c;
12745
12750
  }
@@ -12810,7 +12815,7 @@ function lh(n, e) {
12810
12815
  function Vl(n) {
12811
12816
  n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
12812
12817
  }
12813
- function Po(n, e, t, i) {
12818
+ function Ro(n, e, t, i) {
12814
12819
  return n.someProp("createSelectionBetween", (r) => r(n, e, t)) || L.between(e, t, i);
12815
12820
  }
12816
12821
  function Hl(n) {
@@ -12850,7 +12855,7 @@ function jl(n, e, t) {
12850
12855
  if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
12851
12856
  let r = Xs(n.state, e);
12852
12857
  return r && r instanceof D ? ht(n, r) : !1;
12853
- } else if (!(Re && t.indexOf("m") > -1)) {
12858
+ } else if (!(Pe && t.indexOf("m") > -1)) {
12854
12859
  let r = i.$head, s = r.textOffset ? null : e < 0 ? r.nodeBefore : r.nodeAfter, o;
12855
12860
  if (!s || s.isText)
12856
12861
  return !1;
@@ -12871,7 +12876,7 @@ function jl(n, e, t) {
12871
12876
  function Ji(n) {
12872
12877
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
12873
12878
  }
12874
- function Rn(n, e) {
12879
+ function Pn(n, e) {
12875
12880
  let t = n.pmViewDesc;
12876
12881
  return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
12877
12882
  }
@@ -12883,13 +12888,13 @@ function M3(n) {
12883
12888
  if (!t)
12884
12889
  return;
12885
12890
  let r, s, o = !1;
12886
- for (Ve && t.nodeType == 1 && i < Ji(t) && Rn(t.childNodes[i], -1) && (o = !0); ; )
12891
+ for (Ve && t.nodeType == 1 && i < Ji(t) && Pn(t.childNodes[i], -1) && (o = !0); ; )
12887
12892
  if (i > 0) {
12888
12893
  if (t.nodeType != 1)
12889
12894
  break;
12890
12895
  {
12891
12896
  let a = t.childNodes[i - 1];
12892
- if (Rn(a, -1))
12897
+ if (Pn(a, -1))
12893
12898
  r = t, s = --i;
12894
12899
  else if (a.nodeType == 3)
12895
12900
  t = a, i = t.nodeValue.length;
@@ -12901,7 +12906,7 @@ function M3(n) {
12901
12906
  break;
12902
12907
  {
12903
12908
  let a = t.previousSibling;
12904
- for (; a && Rn(a, -1); )
12909
+ for (; a && Pn(a, -1); )
12905
12910
  r = t.parentNode, s = pe(a), a = a.previousSibling;
12906
12911
  if (a)
12907
12912
  t = a, i = Ji(t);
@@ -12924,7 +12929,7 @@ function _3(n) {
12924
12929
  if (t.nodeType != 1)
12925
12930
  break;
12926
12931
  let a = t.childNodes[i];
12927
- if (Rn(a, 1))
12932
+ if (Pn(a, 1))
12928
12933
  s = t, o = ++i;
12929
12934
  else
12930
12935
  break;
@@ -12933,7 +12938,7 @@ function _3(n) {
12933
12938
  break;
12934
12939
  {
12935
12940
  let a = t.nextSibling;
12936
- for (; a && Rn(a, 1); )
12941
+ for (; a && Pn(a, 1); )
12937
12942
  s = a.parentNode, o = pe(a) + 1, a = a.nextSibling;
12938
12943
  if (a)
12939
12944
  t = a, i = 0, r = Ji(t);
@@ -13012,7 +13017,7 @@ function Wl(n, e) {
13012
13017
  }
13013
13018
  function Ul(n, e, t) {
13014
13019
  let i = n.state.selection;
13015
- if (i instanceof L && !i.empty || t.indexOf("s") > -1 || Re && t.indexOf("m") > -1)
13020
+ if (i instanceof L && !i.empty || t.indexOf("s") > -1 || Pe && t.indexOf("m") > -1)
13016
13021
  return !1;
13017
13022
  let { $from: r, $to: s } = i;
13018
13023
  if (!r.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
@@ -13062,29 +13067,29 @@ function I3(n) {
13062
13067
  }
13063
13068
  function A3(n, e) {
13064
13069
  let t = e.keyCode, i = I3(e);
13065
- if (t == 8 || Re && t == 72 && i == "c")
13070
+ if (t == 8 || Pe && t == 72 && i == "c")
13066
13071
  return ql(n, -1) || en(n, -1);
13067
- if (t == 46 && !e.shiftKey || Re && t == 68 && i == "c")
13072
+ if (t == 46 && !e.shiftKey || Pe && t == 68 && i == "c")
13068
13073
  return ql(n, 1) || en(n, 1);
13069
13074
  if (t == 13 || t == 27)
13070
13075
  return !0;
13071
- if (t == 37 || Re && t == 66 && i == "c") {
13076
+ if (t == 37 || Pe && t == 66 && i == "c") {
13072
13077
  let r = t == 37 ? Wl(n, n.state.selection.from) == "ltr" ? -1 : 1 : -1;
13073
13078
  return jl(n, r, i) || en(n, r);
13074
- } else if (t == 39 || Re && t == 70 && i == "c") {
13079
+ } else if (t == 39 || Pe && t == 70 && i == "c") {
13075
13080
  let r = t == 39 ? Wl(n, n.state.selection.from) == "ltr" ? 1 : -1 : 1;
13076
13081
  return jl(n, r, i) || en(n, r);
13077
13082
  } else {
13078
- if (t == 38 || Re && t == 80 && i == "c")
13083
+ if (t == 38 || Pe && t == 80 && i == "c")
13079
13084
  return Ul(n, -1, i) || en(n, -1);
13080
- if (t == 40 || Re && t == 78 && i == "c")
13085
+ if (t == 40 || Pe && t == 78 && i == "c")
13081
13086
  return O3(n) || Ul(n, 1, i) || en(n, 1);
13082
- if (i == (Re ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
13087
+ if (i == (Pe ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
13083
13088
  return !0;
13084
13089
  }
13085
13090
  return !1;
13086
13091
  }
13087
- function Ro(n, e) {
13092
+ function Po(n, e) {
13088
13093
  n.someProp("transformCopied", (p) => {
13089
13094
  e = p(e, n);
13090
13095
  });
@@ -13135,7 +13140,7 @@ function dh(n, e, t, i, r) {
13135
13140
  } else
13136
13141
  n.someProp("transformPastedHTML", (d) => {
13137
13142
  t = d(t, n);
13138
- }), o = R3(t), ti && L3(o);
13143
+ }), o = P3(t), ti && L3(o);
13139
13144
  let c = o && o.querySelector("[data-pm-slice]"), u = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
13140
13145
  if (u && u[3])
13141
13146
  for (let d = +u[3]; d > 0; d--) {
@@ -13233,15 +13238,15 @@ function gh() {
13233
13238
  return Gl || (Gl = document.implementation.createHTMLDocument("title"));
13234
13239
  }
13235
13240
  let rs = null;
13236
- function P3(n) {
13241
+ function R3(n) {
13237
13242
  let e = window.trustedTypes;
13238
13243
  return e ? (rs || (rs = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), rs.createHTML(n)) : n;
13239
13244
  }
13240
- function R3(n) {
13245
+ function P3(n) {
13241
13246
  let e = /^(\s*<meta [^>]*>)*/.exec(n);
13242
13247
  e && (n = n.slice(e[0].length));
13243
13248
  let t = gh().createElement("div"), i = /<([a-z][^>\s]+)/i.exec(n), r;
13244
- if ((r = i && mh[i[1].toLowerCase()]) && (n = r.map((s) => "<" + s + ">").join("") + n + r.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = P3(n), r)
13249
+ if ((r = i && mh[i[1].toLowerCase()]) && (n = r.map((s) => "<" + s + ">").join("") + n + r.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = R3(n), r)
13245
13250
  for (let s = 0; s < r.length; s++)
13246
13251
  t = t.querySelector(r[s]) || t;
13247
13252
  return t;
@@ -13336,7 +13341,7 @@ _e.keyup = (n, e) => {
13336
13341
  };
13337
13342
  _e.keypress = (n, e) => {
13338
13343
  let t = e;
13339
- if (yh(n, t) || !t.charCode || t.ctrlKey && !t.altKey || Re && t.metaKey)
13344
+ if (yh(n, t) || !t.charCode || t.ctrlKey && !t.altKey || Pe && t.metaKey)
13340
13345
  return;
13341
13346
  if (n.someProp("handleKeyPress", (r) => r(n, t))) {
13342
13347
  t.preventDefault();
@@ -13421,7 +13426,7 @@ function Y3(n, e, t) {
13421
13426
  function Bo(n) {
13422
13427
  return Gi(n);
13423
13428
  }
13424
- const vh = Re ? "metaKey" : "ctrlKey";
13429
+ const vh = Pe ? "metaKey" : "ctrlKey";
13425
13430
  Me.mousedown = (n, e) => {
13426
13431
  let t = e;
13427
13432
  n.input.shiftKey = t.shiftKey;
@@ -13575,7 +13580,7 @@ Me.copy = _e.cut = (n, e) => {
13575
13580
  let t = e, i = n.state.selection, r = t.type == "cut";
13576
13581
  if (i.empty)
13577
13582
  return;
13578
- let s = Wn ? null : t.clipboardData, o = i.content(), { dom: a, text: l } = Ro(n, o);
13583
+ let s = Wn ? null : t.clipboardData, o = i.content(), { dom: a, text: l } = Po(n, o);
13579
13584
  s ? (t.preventDefault(), s.clearData(), s.setData("text/html", a.innerHTML), s.setData("text/plain", l)) : i4(n, a), r && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
13580
13585
  };
13581
13586
  function r4(n) {
@@ -13619,7 +13624,7 @@ class kh {
13619
13624
  this.slice = e, this.move = t, this.node = i;
13620
13625
  }
13621
13626
  }
13622
- const o4 = Re ? "altKey" : "ctrlKey";
13627
+ const o4 = Pe ? "altKey" : "ctrlKey";
13623
13628
  function xh(n, e) {
13624
13629
  let t = n.someProp("dragCopies", (i) => !i(e));
13625
13630
  return t != null ? t : !e[o4];
@@ -13637,7 +13642,7 @@ Me.dragstart = (n, e) => {
13637
13642
  d && d.node.type.spec.draggable && d != n.docView && (o = D.create(n.state.doc, d.posBefore));
13638
13643
  }
13639
13644
  }
13640
- let a = (o || n.state.selection).content(), { dom: l, text: c, slice: u } = Ro(n, a);
13645
+ let a = (o || n.state.selection).content(), { dom: l, text: c, slice: u } = Po(n, a);
13641
13646
  (!t.dataTransfer.files.length || !ce || Jd > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Wn ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Wn || t.dataTransfer.setData("text/plain", c), n.dragging = new kh(u, xh(n, t), o);
13642
13647
  };
13643
13648
  Me.dragend = (n) => {
@@ -13687,7 +13692,7 @@ function a4(n, e, t) {
13687
13692
  l.setSelection(new D(f));
13688
13693
  else {
13689
13694
  let p = l.mapping.map(a);
13690
- l.mapping.maps[l.mapping.maps.length - 1].forEach((m, v, y, g) => p = g), l.setSelection(Po(n, f, l.doc.resolve(p)));
13695
+ l.mapping.maps[l.mapping.maps.length - 1].forEach((m, v, y, g) => p = g), l.setSelection(Ro(n, f, l.doc.resolve(p)));
13691
13696
  }
13692
13697
  n.focus(), n.dispatch(l.setMeta("uiEvent", "drop"));
13693
13698
  }
@@ -14098,8 +14103,8 @@ function l4(n, e, t, i, r, s, o) {
14098
14103
  let b = a[g + 1];
14099
14104
  if (b < 0 || f > b + u - d)
14100
14105
  continue;
14101
- let w = a[g] + u - d;
14102
- p >= w ? a[g + 1] = f <= w ? -2 : -1 : f >= u && y && (a[g] += y, a[g + 1] += y);
14106
+ let k = a[g] + u - d;
14107
+ p >= k ? a[g + 1] = f <= k ? -2 : -1 : f >= u && y && (a[g] += y, a[g + 1] += y);
14103
14108
  }
14104
14109
  d += y;
14105
14110
  }), u = t.maps[c].map(u, -1);
@@ -14518,35 +14523,35 @@ function w4(n, e, t, i, r) {
14518
14523
  return M(n, At(13, "Enter"));
14519
14524
  });
14520
14525
  }, 20));
14521
- let w = m.start, k = m.endA, x = (M) => {
14522
- let O = M || n.state.tr.replace(w, k, c.doc.slice(m.start - c.from, m.endB - c.from));
14526
+ let k = m.start, w = m.endA, x = (M) => {
14527
+ let O = M || n.state.tr.replace(k, w, c.doc.slice(m.start - c.from, m.endB - c.from));
14523
14528
  if (c.sel) {
14524
14529
  let E = ec(n, O.doc, c.sel);
14525
- E && !(ce && n.composing && E.empty && (m.start != m.endB || n.input.lastChromeDelete < Date.now() - 100) && (E.head == w || E.head == O.mapping.map(k) - 1) || Oe && E.empty && E.head == w) && O.setSelection(E);
14530
+ E && !(ce && n.composing && E.empty && (m.start != m.endB || n.input.lastChromeDelete < Date.now() - 100) && (E.head == k || E.head == O.mapping.map(w) - 1) || Oe && E.empty && E.head == k) && O.setSelection(E);
14526
14531
  }
14527
14532
  return s && O.setMeta("composition", s), O.scrollIntoView();
14528
14533
  }, T;
14529
14534
  if (b)
14530
14535
  if (v.pos == y.pos) {
14531
14536
  Oe && bt <= 11 && v.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => at(n), 20));
14532
- let M = x(n.state.tr.delete(w, k)), O = u.resolve(m.start).marksAcross(u.resolve(m.endA));
14537
+ let M = x(n.state.tr.delete(k, w)), O = u.resolve(m.start).marksAcross(u.resolve(m.endA));
14533
14538
  O && M.ensureMarks(O), n.dispatch(M);
14534
14539
  } else if (
14535
14540
  // Adding or removing a mark
14536
14541
  m.endA == m.endB && (T = C4(v.parent.content.cut(v.parentOffset, y.parentOffset), g.parent.content.cut(g.parentOffset, m.endA - g.start())))
14537
14542
  ) {
14538
14543
  let M = x(n.state.tr);
14539
- T.type == "add" ? M.addMark(w, k, T.mark) : M.removeMark(w, k, T.mark), n.dispatch(M);
14544
+ T.type == "add" ? M.addMark(k, w, T.mark) : M.removeMark(k, w, T.mark), n.dispatch(M);
14540
14545
  } else if (v.parent.child(v.index()).isText && v.index() == y.index() - (y.textOffset ? 0 : 1)) {
14541
- let M = v.parent.textBetween(v.parentOffset, y.parentOffset), O = () => x(n.state.tr.insertText(M, w, k));
14542
- n.someProp("handleTextInput", (E) => E(n, w, k, M, O)) || n.dispatch(O());
14546
+ let M = v.parent.textBetween(v.parentOffset, y.parentOffset), O = () => x(n.state.tr.insertText(M, k, w));
14547
+ n.someProp("handleTextInput", (E) => E(n, k, w, M, O)) || n.dispatch(O());
14543
14548
  } else
14544
14549
  n.dispatch(x());
14545
14550
  else
14546
14551
  n.dispatch(x());
14547
14552
  }
14548
14553
  function ec(n, e, t) {
14549
- return Math.max(t.anchor, t.head) > e.content.size ? null : Po(n, e.resolve(t.anchor), e.resolve(t.head));
14554
+ return Math.max(t.anchor, t.head) > e.content.size ? null : Ro(n, e.resolve(t.anchor), e.resolve(t.head));
14550
14555
  }
14551
14556
  function C4(n, e) {
14552
14557
  let t = n.firstChild.marks, i = e.firstChild.marks, r = t, s = i, o, a, l;
@@ -14627,7 +14632,7 @@ class _h {
14627
14632
  added to the document.
14628
14633
  */
14629
14634
  constructor(e, t) {
14630
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new F3(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(oc), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = rc(this), ic(this), this.nodeViews = sc(this), this.docView = Rl(this.state.doc, nc(this), ss(this), this.dom, this), this.domObserver = new f4(this, (i, r, s, o) => w4(this, i, r, s, o)), this.domObserver.start(), V3(this), this.updatePluginViews();
14635
+ this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new F3(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(oc), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = rc(this), ic(this), this.nodeViews = sc(this), this.docView = Pl(this.state.doc, nc(this), ss(this), this.dom, this), this.domObserver = new f4(this, (i, r, s, o) => w4(this, i, r, s, o)), this.domObserver.start(), V3(this), this.updatePluginViews();
14631
14636
  }
14632
14637
  /**
14633
14638
  Holds `true` when a
@@ -14698,7 +14703,7 @@ class _h {
14698
14703
  let p = d && (Oe || ce) && !this.composing && !r.selection.empty && !e.selection.empty && S4(r.selection, e.selection);
14699
14704
  if (d) {
14700
14705
  let m = ce ? this.trackWrites = this.domSelectionRange().focusNode : null;
14701
- this.composing && (this.input.compositionNode = t4(this)), (s || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Rl(e.doc, c, l, this.dom, this)), m && !this.trackWrites && (p = !0);
14706
+ this.composing && (this.input.compositionNode = t4(this)), (s || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Pl(e.doc, c, l, this.dom, this)), m && !this.trackWrites && (p = !0);
14702
14707
  }
14703
14708
  p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && T3(this)) ? at(this, p) : (lh(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
14704
14709
  }
@@ -14914,7 +14919,7 @@ class _h {
14914
14919
  [`transformCopied`](https://prosemirror.net/docs/ref/#view.EditorProps.transformCopied)).
14915
14920
  */
14916
14921
  serializeForClipboard(e) {
14917
- return Ro(this, e);
14922
+ return Po(this, e);
14918
14923
  }
14919
14924
  /**
14920
14925
  Removes the editor from the DOM and destroys all [node
@@ -15245,8 +15250,8 @@ var wr = class {
15245
15250
  }
15246
15251
  }, Eh = {};
15247
15252
  Ho(Eh, {
15248
- blur: () => P4,
15249
- clearContent: () => R4,
15253
+ blur: () => R4,
15254
+ clearContent: () => P4,
15250
15255
  clearNodes: () => L4,
15251
15256
  command: () => z4,
15252
15257
  createParagraphNear: () => B4,
@@ -15306,10 +15311,10 @@ Ho(Eh, {
15306
15311
  wrapIn: () => l8,
15307
15312
  wrapInList: () => c8
15308
15313
  });
15309
- var P4 = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
15314
+ var R4 = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
15310
15315
  var t;
15311
15316
  n.isDestroyed || (e.dom.blur(), (t = window == null ? void 0 : window.getSelection()) == null || t.removeAllRanges());
15312
- }), !0), R4 = (n = !0) => ({ commands: e }) => e.setContent("", { emitUpdate: n }), L4 = () => ({ state: n, tr: e, dispatch: t }) => {
15317
+ }), !0), P4 = (n = !0) => ({ commands: e }) => e.setContent("", { emitUpdate: n }), L4 = () => ({ state: n, tr: e, dispatch: t }) => {
15313
15318
  const { selection: i } = e, { ranges: r } = i;
15314
15319
  return t && r.forEach(({ $from: s, $to: o }) => {
15315
15320
  n.doc.nodesBetween(s.pos, o.pos, (a, l) => {
@@ -15431,7 +15436,7 @@ var K4 = (n, e = {}) => ({ tr: t, state: i, dispatch: r }) => {
15431
15436
  function Ah(n) {
15432
15437
  return n instanceof L;
15433
15438
  }
15434
- function Pt(n = 0, e = 0, t = 0) {
15439
+ function Rt(n = 0, e = 0, t = 0) {
15435
15440
  return Math.min(Math.max(n, e), t);
15436
15441
  }
15437
15442
  function Dh(n, e = null) {
@@ -15443,7 +15448,7 @@ function Dh(n, e = null) {
15443
15448
  if (e === "end")
15444
15449
  return i;
15445
15450
  const r = t.from, s = i.to;
15446
- return e === "all" ? L.create(n, Pt(0, r, s), Pt(n.content.size, r, s)) : L.create(n, Pt(e, r, s), Pt(e, r, s));
15451
+ return e === "all" ? L.create(n, Rt(0, r, s), Rt(n.content.size, r, s)) : L.create(n, Rt(e, r, s), Rt(e, r, s));
15447
15452
  }
15448
15453
  function G4() {
15449
15454
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
@@ -15607,8 +15612,8 @@ var ev = (n) => !("type" in n), tv = (n, e, t) => ({ tr: i, dispatch: r, editor:
15607
15612
  i.insertText(v, u, d);
15608
15613
  } else {
15609
15614
  v = a;
15610
- const y = i.doc.resolve(u), g = y.node(), b = y.parentOffset === 0, w = g.isText || g.isTextblock, k = g.content.size > 0;
15611
- b && w && k && (u = Math.max(0, u - 1)), i.replaceWith(u, d, v);
15615
+ const y = i.doc.resolve(u), g = y.node(), b = y.parentOffset === 0, k = g.isText || g.isTextblock, w = g.content.size > 0;
15616
+ b && k && w && (u = Math.max(0, u - 1)), i.replaceWith(u, d, v);
15612
15617
  }
15613
15618
  t.updateSelection && Q4(i, i.steps.length - 1, -1), t.applyInputRules && i.setMeta("applyInputRules", { from: u, text: v }), t.applyPasteRules && i.setMeta("applyPasteRules", { from: u, text: v });
15614
15619
  }
@@ -15628,7 +15633,7 @@ var ev = (n) => !("type" in n), tv = (n, e, t) => ({ tr: i, dispatch: r, editor:
15628
15633
  return !1;
15629
15634
  }
15630
15635
  }, lv = () => ({ state: n, dispatch: e }) => C6(n, e), cv = () => ({ state: n, dispatch: e }) => k6(n, e);
15631
- function Ph() {
15636
+ function Rh() {
15632
15637
  return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
15633
15638
  }
15634
15639
  function uv(n) {
@@ -15647,7 +15652,7 @@ function uv(n) {
15647
15652
  else if (/^s(hift)?$/i.test(l))
15648
15653
  s = !0;
15649
15654
  else if (/^mod$/i.test(l))
15650
- Wo() || Ph() ? o = !0 : r = !0;
15655
+ Wo() || Rh() ? o = !0 : r = !0;
15651
15656
  else
15652
15657
  throw new Error("Unrecognized modifier name: ".concat(l));
15653
15658
  }
@@ -15722,7 +15727,7 @@ var gv = (n, e) => ({ tr: t, state: i, dispatch: r }) => {
15722
15727
  n.setSelection(t);
15723
15728
  }
15724
15729
  return !0;
15725
- }, bv = () => ({ state: n, dispatch: e }) => x6(n, e), wv = () => ({ state: n, dispatch: e }) => T6(n, e), Cv = () => ({ state: n, dispatch: e }) => D6(n, e), kv = () => ({ state: n, dispatch: e }) => R6(n, e), xv = () => ({ state: n, dispatch: e }) => P6(n, e);
15730
+ }, bv = () => ({ state: n, dispatch: e }) => x6(n, e), wv = () => ({ state: n, dispatch: e }) => T6(n, e), Cv = () => ({ state: n, dispatch: e }) => D6(n, e), kv = () => ({ state: n, dispatch: e }) => P6(n, e), xv = () => ({ state: n, dispatch: e }) => R6(n, e);
15726
15731
  function eo(n, e, t = {}, i = {}) {
15727
15732
  return Kn(n, e, {
15728
15733
  slice: !1,
@@ -15743,7 +15748,7 @@ var Sv = (n, { errorOnInvalidContent: e, emitUpdate: t = !0, parseOptions: i = {
15743
15748
  errorOnInvalidContent: e != null ? e : r.options.enableContentCheck
15744
15749
  });
15745
15750
  };
15746
- function Rh(n, e) {
15751
+ function Ph(n, e) {
15747
15752
  const t = lt(e, n.schema), { from: i, to: r, empty: s } = n.selection, o = [];
15748
15753
  s ? (n.storedMarks && o.push(...n.storedMarks), o.push(...n.selection.$head.marks())) : n.doc.nodesBetween(i, r, (l) => {
15749
15754
  o.push(...l.marks);
@@ -15954,10 +15959,10 @@ function Ov(n, e) {
15954
15959
  storage: c.storage,
15955
15960
  editor: e
15956
15961
  }, f = n.reduce((g, b) => {
15957
- const w = I(b, "extendNodeSchema", d);
15962
+ const k = I(b, "extendNodeSchema", d);
15958
15963
  return {
15959
15964
  ...g,
15960
- ...w ? w(c) : {}
15965
+ ...k ? k(c) : {}
15961
15966
  };
15962
15967
  }, {}), p = uc({
15963
15968
  ...f,
@@ -16085,17 +16090,17 @@ function $v(n, e) {
16085
16090
  typeof e == "string" ? e : e.name,
16086
16091
  n.schema
16087
16092
  );
16088
- return t === "node" ? Dv(n, e) : t === "mark" ? Rh(n, e) : {};
16093
+ return t === "node" ? Dv(n, e) : t === "mark" ? Ph(n, e) : {};
16089
16094
  }
16090
- function Pv(n, e = JSON.stringify) {
16095
+ function Rv(n, e = JSON.stringify) {
16091
16096
  const t = {};
16092
16097
  return n.filter((i) => {
16093
16098
  const r = e(i);
16094
16099
  return Object.prototype.hasOwnProperty.call(t, r) ? !1 : t[r] = !0;
16095
16100
  });
16096
16101
  }
16097
- function Rv(n) {
16098
- const e = Pv(n);
16102
+ function Pv(n) {
16103
+ const e = Rv(n);
16099
16104
  return e.length === 1 ? e : e.filter((t, i) => !e.filter((s, o) => o !== i).some((s) => t.oldRange.from >= s.oldRange.from && t.oldRange.to <= s.oldRange.to && t.newRange.from >= s.newRange.from && t.newRange.to <= s.newRange.to));
16100
16105
  }
16101
16106
  function Lv(n) {
@@ -16125,7 +16130,7 @@ function Lv(n) {
16125
16130
  }
16126
16131
  });
16127
16132
  });
16128
- }), Rv(i);
16133
+ }), Pv(i);
16129
16134
  }
16130
16135
  function us(n, e) {
16131
16136
  return e.nodes[n] || e.marks[n] || null;
@@ -16163,10 +16168,10 @@ function to(n, e, t = {}) {
16163
16168
  n.doc.nodesBetween(p, m, (v, y) => {
16164
16169
  if (!v.isText && !v.marks.length)
16165
16170
  return;
16166
- const g = Math.max(p, y), b = Math.min(m, y + v.nodeSize), w = b - g;
16167
- o += w, a.push(
16168
- ...v.marks.map((k) => ({
16169
- mark: k,
16171
+ const g = Math.max(p, y), b = Math.min(m, y + v.nodeSize), k = b - g;
16172
+ o += k, a.push(
16173
+ ...v.marks.map((w) => ({
16174
+ mark: w,
16170
16175
  from: g,
16171
16176
  to: b
16172
16177
  }))
@@ -16280,7 +16285,7 @@ var Wv = (n, e = {}) => ({ tr: t, state: i, dispatch: r }) => {
16280
16285
  const { selection: s } = t, { empty: o, ranges: a } = s, l = lt(n, i.schema);
16281
16286
  if (r)
16282
16287
  if (o) {
16283
- const c = Rh(i, l);
16288
+ const c = Ph(i, l);
16284
16289
  t.addStoredMark(
16285
16290
  l.create({
16286
16291
  ...c,
@@ -16311,7 +16316,7 @@ var Wv = (n, e = {}) => ({ tr: t, state: i, dispatch: r }) => {
16311
16316
  return t.selection.$anchor.sameParent(t.selection.$head) && (o = t.selection.$anchor.parent.attrs), s.isTextblock ? r().command(({ commands: a }) => _l(s, { ...o, ...e })(t) ? !0 : a.clearNodes()).command(({ state: a }) => _l(s, { ...o, ...e })(a, i)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
16312
16317
  }, Kv = (n) => ({ tr: e, dispatch: t }) => {
16313
16318
  if (t) {
16314
- const { doc: i } = e, r = Pt(n, 0, i.content.size), s = D.create(i, r);
16319
+ const { doc: i } = e, r = Rt(n, 0, i.content.size), s = D.create(i, r);
16315
16320
  e.setSelection(s);
16316
16321
  }
16317
16322
  return !0;
@@ -16326,7 +16331,7 @@ var Wv = (n, e = {}) => ({ tr: t, state: i, dispatch: r }) => {
16326
16331
  }), !0;
16327
16332
  }, Gv = (n) => ({ tr: e, dispatch: t }) => {
16328
16333
  if (t) {
16329
- const { doc: i } = e, { from: r, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = L.atStart(i).from, a = L.atEnd(i).to, l = Pt(r, o, a), c = Pt(s, o, a), u = L.create(i, l, c);
16334
+ const { doc: i } = e, { from: r, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = L.atStart(i).from, a = L.atEnd(i).to, l = Rt(r, o, a), c = Rt(s, o, a), u = L.create(i, l, c);
16330
16335
  e.setSelection(u);
16331
16336
  }
16332
16337
  return !0;
@@ -16384,16 +16389,16 @@ var Yv = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
16384
16389
  const b = l.index(-1) ? 1 : l.index(-2) ? 2 : 3;
16385
16390
  for (let O = l.depth - b; O >= l.depth - 3; O -= 1)
16386
16391
  g = S.from(l.node(O).copy(g));
16387
- const w = (
16392
+ const k = (
16388
16393
  // eslint-disable-next-line no-nested-ternary
16389
16394
  l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3
16390
- ), k = {
16395
+ ), w = {
16391
16396
  ...Ai(f, l.node().type.name, l.node().attrs),
16392
16397
  ...e
16393
- }, x = ((o = a.contentMatch.defaultType) == null ? void 0 : o.createAndFill(k)) || void 0;
16398
+ }, x = ((o = a.contentMatch.defaultType) == null ? void 0 : o.createAndFill(w)) || void 0;
16394
16399
  g = g.append(S.from(a.createAndFill(null, x) || void 0));
16395
16400
  const T = l.before(l.depth - (b - 1));
16396
- t.replace(T, l.after(-w), new N(g, 4 - b, 0));
16401
+ t.replace(T, l.after(-k), new N(g, 4 - b, 0));
16397
16402
  let M = -1;
16398
16403
  t.doc.nodesBetween(T, t.doc.content.size, (O, E) => {
16399
16404
  if (M > -1)
@@ -16418,10 +16423,10 @@ var Yv = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
16418
16423
  if (!un(t.doc, l.pos, 2))
16419
16424
  return !1;
16420
16425
  if (r) {
16421
- const { selection: g, storedMarks: b } = i, { splittableMarks: w } = s.extensionManager, k = b || g.$to.parentOffset && g.$from.marks();
16422
- if (t.split(l.pos, 2, y).scrollIntoView(), !k || !r)
16426
+ const { selection: g, storedMarks: b } = i, { splittableMarks: k } = s.extensionManager, w = b || g.$to.parentOffset && g.$from.marks();
16427
+ if (t.split(l.pos, 2, y).scrollIntoView(), !w || !r)
16423
16428
  return !0;
16424
- const x = k.filter((T) => w.includes(T.type.name));
16429
+ const x = w.filter((T) => k.includes(T.type.name));
16425
16430
  t.ensureMarks(x);
16426
16431
  }
16427
16432
  return !0;
@@ -16444,18 +16449,18 @@ var Yv = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
16444
16449
  const r = n.doc.nodeAt(i);
16445
16450
  return t.node.type === (r == null ? void 0 : r.type) && Gt(n.doc, i) && n.join(i), !0;
16446
16451
  }, Qv = (n, e, t, i = {}) => ({ editor: r, tr: s, state: o, dispatch: a, chain: l, commands: c, can: u }) => {
16447
- const { extensions: d, splittableMarks: f } = r.extensionManager, p = he(n, o.schema), m = he(e, o.schema), { selection: v, storedMarks: y } = o, { $from: g, $to: b } = v, w = g.blockRange(b), k = y || v.$to.parentOffset && v.$from.marks();
16448
- if (!w)
16452
+ const { extensions: d, splittableMarks: f } = r.extensionManager, p = he(n, o.schema), m = he(e, o.schema), { selection: v, storedMarks: y } = o, { $from: g, $to: b } = v, k = g.blockRange(b), w = y || v.$to.parentOffset && v.$from.marks();
16453
+ if (!k)
16449
16454
  return !1;
16450
16455
  const x = Uo((T) => fc(T.type.name, d))(v);
16451
- if (w.depth >= 1 && x && w.depth - x.depth <= 1) {
16456
+ if (k.depth >= 1 && x && k.depth - x.depth <= 1) {
16452
16457
  if (x.node.type === p)
16453
16458
  return c.liftListItem(m);
16454
16459
  if (fc(x.node.type.name, d) && p.validContent(x.node.content) && a)
16455
16460
  return l().command(() => (s.setNodeMarkup(x.pos, p), !0)).command(() => ds(s, p)).command(() => hs(s, p)).run();
16456
16461
  }
16457
- return !t || !k || !a ? l().command(() => u().wrapInList(p, i) ? !0 : c.clearNodes()).wrapInList(p, i).command(() => ds(s, p)).command(() => hs(s, p)).run() : l().command(() => {
16458
- const T = u().wrapInList(p, i), M = k.filter((O) => f.includes(O.type.name));
16462
+ return !t || !w || !a ? l().command(() => u().wrapInList(p, i) ? !0 : c.clearNodes()).wrapInList(p, i).command(() => ds(s, p)).command(() => hs(s, p)).run() : l().command(() => {
16463
+ const T = u().wrapInList(p, i), M = w.filter((O) => f.includes(O.type.name));
16459
16464
  return s.ensureMarks(M), T ? !0 : c.clearNodes();
16460
16465
  }).wrapInList(p, i).command(() => ds(s, p)).command(() => hs(s, p)).run();
16461
16466
  }, e8 = (n, e = {}, t = {}) => ({ state: i, commands: r }) => {
@@ -16537,10 +16542,10 @@ var Yv = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
16537
16542
  ...e
16538
16543
  })), o && y.marks.length && y.marks.forEach((b) => {
16539
16544
  if (o === b.type && (l = !0, r)) {
16540
- const w = Math.max(g, u), k = Math.min(g + y.nodeSize, d);
16545
+ const k = Math.max(g, u), w = Math.min(g + y.nodeSize, d);
16541
16546
  t.addMark(
16542
- w,
16543
16547
  k,
16548
+ w,
16544
16549
  o.create({
16545
16550
  ...b.attrs,
16546
16551
  ...e
@@ -16631,7 +16636,7 @@ function ki(n) {
16631
16636
  }), y = {
16632
16637
  from: i - (p[0].length - s.length),
16633
16638
  to: r
16634
- }, { commands: g, chain: b, can: w } = new wr({
16639
+ }, { commands: g, chain: b, can: k } = new wr({
16635
16640
  editor: t,
16636
16641
  state: v
16637
16642
  });
@@ -16641,7 +16646,7 @@ function ki(n) {
16641
16646
  match: p,
16642
16647
  commands: g,
16643
16648
  chain: b,
16644
- can: w
16649
+ can: k
16645
16650
  }) === null || !m.steps.length || (f.undoable && m.setMeta(a, {
16646
16651
  transform: m,
16647
16652
  from: i,
@@ -16821,10 +16826,10 @@ function y8(n) {
16821
16826
  state: t
16822
16827
  }), d = [];
16823
16828
  return t.doc.nodesBetween(i, r, (p, m) => {
16824
- var v, y, g, b, w;
16829
+ var v, y, g, b, k;
16825
16830
  if ((y = (v = p.type) == null ? void 0 : v.spec) != null && y.code || !(p.isText || p.isTextblock || p.isInline))
16826
16831
  return;
16827
- const k = (w = (b = (g = p.content) == null ? void 0 : g.size) != null ? b : p.nodeSize) != null ? w : 0, x = Math.max(i, m), T = Math.min(r, m + k);
16832
+ const w = (k = (b = (g = p.content) == null ? void 0 : g.size) != null ? b : p.nodeSize) != null ? k : 0, x = Math.max(i, m), T = Math.min(r, m + w);
16828
16833
  if (x >= T)
16829
16834
  return;
16830
16835
  const M = p.isText ? p.text || "" : p.textBetween(x - m, T - m, void 0, "");
@@ -16941,13 +16946,13 @@ function w8(n) {
16941
16946
  pasteEvt: O
16942
16947
  });
16943
16948
  }
16944
- const w = f.doc.content.findDiffStart(p.doc.content), k = f.doc.content.findDiffEnd(p.doc.content);
16945
- if (!(!g8(w) || !k || w === k.b))
16949
+ const k = f.doc.content.findDiffStart(p.doc.content), w = f.doc.content.findDiffEnd(p.doc.content);
16950
+ if (!(!g8(k) || !w || k === w.b))
16946
16951
  return l({
16947
16952
  rule: u,
16948
16953
  state: p,
16949
- from: w,
16950
- to: k,
16954
+ from: k,
16955
+ to: w,
16951
16956
  pasteEvt: o
16952
16957
  });
16953
16958
  }
@@ -17238,15 +17243,15 @@ var se = class qh extends Go {
17238
17243
  u.steps.forEach((p, m) => {
17239
17244
  var v, y;
17240
17245
  if (p instanceof Ke) {
17241
- const g = f.slice(m).map(p.from, -1), b = f.slice(m).map(p.to), w = f.invert().map(g, -1), k = f.invert().map(b), x = (v = u.doc.nodeAt(g - 1)) == null ? void 0 : v.marks.some((M) => M.eq(p.mark)), T = (y = u.doc.nodeAt(b)) == null ? void 0 : y.marks.some((M) => M.eq(p.mark));
17246
+ const g = f.slice(m).map(p.from, -1), b = f.slice(m).map(p.to), k = f.invert().map(g, -1), w = f.invert().map(b), x = (v = u.doc.nodeAt(g - 1)) == null ? void 0 : v.marks.some((M) => M.eq(p.mark)), T = (y = u.doc.nodeAt(b)) == null ? void 0 : y.marks.some((M) => M.eq(p.mark));
17242
17247
  this.editor.emit("delete", {
17243
17248
  type: "mark",
17244
17249
  mark: p.mark,
17245
17250
  from: p.from,
17246
17251
  to: p.to,
17247
17252
  deletedRange: {
17248
- from: w,
17249
- to: k
17253
+ from: k,
17254
+ to: w
17250
17255
  },
17251
17256
  newRange: {
17252
17257
  from: g,
@@ -17362,7 +17367,7 @@ var se = class qh extends Go {
17362
17367
  "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
17363
17368
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd()
17364
17369
  };
17365
- return Wo() || Ph() ? s : r;
17370
+ return Wo() || Rh() ? s : r;
17366
17371
  },
17367
17372
  addProseMirrorPlugins() {
17368
17373
  return [
@@ -18307,8 +18312,8 @@ Ho(E8, {
18307
18312
  createBlockMarkdownSpec: () => I8,
18308
18313
  createInlineMarkdownSpec: () => $8,
18309
18314
  parseAttributes: () => Xo,
18310
- parseIndentedBlocks: () => P8,
18311
- renderNestedMarkdownContent: () => R8,
18315
+ parseIndentedBlocks: () => R8,
18316
+ renderNestedMarkdownContent: () => P8,
18312
18317
  serializeAttributes: () => Yo
18313
18318
  });
18314
18319
  function Xo(n) {
@@ -18431,8 +18436,8 @@ function I8(n) {
18431
18436
  const v = new RegExp("^:::".concat(c, "(?:\\s+\\{([^}]*)\\})?\\s*\\n")), y = d.match(v);
18432
18437
  if (!y)
18433
18438
  return;
18434
- const [g, b = ""] = y, w = r(b);
18435
- let k = 1;
18439
+ const [g, b = ""] = y, k = r(b);
18440
+ let w = 1;
18436
18441
  const x = g.length;
18437
18442
  let T = "";
18438
18443
  const M = /^:::([\w-]*)(\s.*)?/gm, O = d.slice(x);
@@ -18443,8 +18448,8 @@ function I8(n) {
18443
18448
  const V = E.index, W = E[1];
18444
18449
  if (!((m = E[2]) != null && m.endsWith(":::"))) {
18445
18450
  if (W)
18446
- k += 1;
18447
- else if (k -= 1, k === 0) {
18451
+ w += 1;
18452
+ else if (w -= 1, w === 0) {
18448
18453
  const oe = O.slice(0, V);
18449
18454
  T = oe.trim();
18450
18455
  const ct = d.slice(0, x + V + E[0].length);
@@ -18465,7 +18470,7 @@ function I8(n) {
18465
18470
  return {
18466
18471
  type: e,
18467
18472
  raw: ct,
18468
- attributes: w,
18473
+ attributes: k,
18469
18474
  content: T,
18470
18475
  tokens: U
18471
18476
  };
@@ -18533,18 +18538,18 @@ function $8(n) {
18533
18538
  return;
18534
18539
  let g = "", b = "";
18535
18540
  if (a) {
18536
- const [, k] = y;
18537
- b = k;
18541
+ const [, w] = y;
18542
+ b = w;
18538
18543
  } else {
18539
- const [, k, x] = y;
18540
- b = k, g = x || "";
18544
+ const [, w, x] = y;
18545
+ b = w, g = x || "";
18541
18546
  }
18542
- const w = r(b.trim());
18547
+ const k = r(b.trim());
18543
18548
  return {
18544
18549
  type: e,
18545
18550
  raw: y[0],
18546
18551
  content: g.trim(),
18547
- attributes: w
18552
+ attributes: k
18548
18553
  };
18549
18554
  }
18550
18555
  },
@@ -18556,7 +18561,7 @@ function $8(n) {
18556
18561
  }
18557
18562
  };
18558
18563
  }
18559
- function P8(n, e, t) {
18564
+ function R8(n, e, t) {
18560
18565
  var i, r, s, o;
18561
18566
  const a = n.split("\n"), l = [];
18562
18567
  let c = "", u = 0;
@@ -18593,13 +18598,13 @@ function P8(n, e, t) {
18593
18598
  break;
18594
18599
  }
18595
18600
  let b;
18596
- const w = g.slice(1);
18597
- if (w.length > 0) {
18598
- const x = w.map((T) => T.slice(v + d)).join("\n");
18601
+ const k = g.slice(1);
18602
+ if (k.length > 0) {
18603
+ const x = k.map((T) => T.slice(v + d)).join("\n");
18599
18604
  x.trim() && (e.customNestedParser ? b = e.customNestedParser(x) : b = t.blockTokens(x));
18600
18605
  }
18601
- const k = e.createToken(m, b);
18602
- l.push(k);
18606
+ const w = e.createToken(m, b);
18607
+ l.push(w);
18603
18608
  }
18604
18609
  if (l.length !== 0)
18605
18610
  return {
@@ -18607,7 +18612,7 @@ function P8(n, e, t) {
18607
18612
  raw: c
18608
18613
  };
18609
18614
  }
18610
- function R8(n, e, t, i) {
18615
+ function P8(n, e, t, i) {
18611
18616
  if (!n || !Array.isArray(n.content))
18612
18617
  return "";
18613
18618
  const r = typeof t == "function" ? t(i) : t, [s, ...o] = n.content, a = e.renderChildren([s]), l = ["".concat(r).concat(a)];
@@ -19833,7 +19838,7 @@ const yc = new z("chat-editor"), df = ({
19833
19838
  onKeyDown: s
19834
19839
  }) => {
19835
19840
  const o = F(null), a = F(null);
19836
- return R(() => {
19841
+ return P(() => {
19837
19842
  if (!a.current)
19838
19843
  return;
19839
19844
  const l = async (u) => {
@@ -19962,15 +19967,15 @@ const yc = new z("chat-editor"), df = ({
19962
19967
  }
19963
19968
  }));
19964
19969
  };
19965
- R(() => {
19970
+ P(() => {
19966
19971
  f();
19967
- }, [l.value.remainingText, c]), R(() => {
19972
+ }, [l.value.remainingText, c]), P(() => {
19968
19973
  if (!o.current || !window.ResizeObserver)
19969
19974
  return;
19970
19975
  const b = new ResizeObserver(() => {
19971
- var k;
19972
- const w = (k = t.value) == null ? void 0 : k.previewer.options.previewerDom;
19973
- w && (s.value = w.scrollHeight > i.value);
19976
+ var w;
19977
+ const k = (w = t.value) == null ? void 0 : w.previewer.options.previewerDom;
19978
+ k && (s.value = k.scrollHeight > i.value);
19974
19979
  });
19975
19980
  return b.observe(o.current), () => {
19976
19981
  b.disconnect();
@@ -20002,7 +20007,7 @@ const yc = new z("chat-editor"), df = ({
20002
20007
  onClick: p,
20003
20008
  children: /* @__PURE__ */ h("div", { className: re.em("content", "warning"), children: [
20004
20009
  /* @__PURE__ */ h("div", { className: "warning-icon", title: C.t.value("retry"), children: /* @__PURE__ */ h(Dg, {}) }),
20005
- /* @__PURE__ */ h("div", { className: "refresh-icon", title: C.t.value("retry"), children: /* @__PURE__ */ h(Rs, {}) })
20010
+ /* @__PURE__ */ h("div", { className: "refresh-icon", title: C.t.value("retry"), children: /* @__PURE__ */ h(Ps, {}) })
20006
20011
  ] })
20007
20012
  }
20008
20013
  ),
@@ -20164,7 +20169,7 @@ const Nt = new z("error-message"), y7 = (n) => {
20164
20169
  return !1;
20165
20170
  }
20166
20171
  };
20167
- R(() => {
20172
+ P(() => {
20168
20173
  if (t >= 0 && o.value) {
20169
20174
  if (e.content && e.content.indexOf("<think>") !== -1) {
20170
20175
  const { isThoughtCompleted: p, thoughtContent: m, answerContent: v } = u(e.content);
@@ -20173,7 +20178,7 @@ const Nt = new z("error-message"), y7 = (n) => {
20173
20178
  l(e.content);
20174
20179
  o.value.setMarkdown(a.value.remainingText || "");
20175
20180
  }
20176
- }, [e, t]), R(() => {
20181
+ }, [e, t]), P(() => {
20177
20182
  let p = "";
20178
20183
  if (e.content && e.content.indexOf("<think>") !== -1) {
20179
20184
  const { isThoughtCompleted: m, thoughtContent: v, answerContent: y } = u(e.content);
@@ -20418,7 +20423,7 @@ class Ot {
20418
20423
  * @description 计算聊天步骤
20419
20424
  */
20420
20425
  computeChatSteps() {
20421
- this.chatsteps = Pu.parse(this.allcontent);
20426
+ this.chatsteps = Ru.parse(this.allcontent);
20422
20427
  }
20423
20428
  /**
20424
20429
  * @description 计算聊天界面操作
@@ -20563,10 +20568,10 @@ const Ne = new z("chat-toolbar-item"), k7 = (n) => {
20563
20568
  if (u(e))
20564
20569
  return /* @__PURE__ */ h(Je, {});
20565
20570
  const d = (b) => r ? !0 : typeof b.disabled == "function" ? b.disabled(t) : b.disabled === !0, f = (b) => {
20566
- var w, k, x, T;
20571
+ var k, w, x, T;
20567
20572
  if (typeof b.icon == "function")
20568
20573
  return b.icon();
20569
- if ((w = b.icon) != null && w.showIcon && ((k = b.icon) != null && k.cssClass))
20574
+ if ((k = b.icon) != null && k.showIcon && ((w = b.icon) != null && w.cssClass))
20570
20575
  return /* @__PURE__ */ h("i", { className: b.icon.cssClass });
20571
20576
  if ((x = b.icon) != null && x.showIcon && ((T = b.icon) != null && T.imagePath))
20572
20577
  return ar(b.icon.imagePath) ? /* @__PURE__ */ h(
@@ -20579,12 +20584,12 @@ const Ne = new z("chat-toolbar-item"), k7 = (n) => {
20579
20584
  ) : /* @__PURE__ */ h("img", { src: b.icon.imagePath });
20580
20585
  }, p = (b) => {
20581
20586
  d(e) || l(!0);
20582
- }, m = (b, w) => {
20583
- d(w) || (l(!1), o(b, w));
20587
+ }, m = (b, k) => {
20588
+ d(k) || (l(!1), o(b, k));
20584
20589
  };
20585
- return R(() => {
20586
- const b = (w) => {
20587
- c.current && c.current.contains(w.target) || l(!1);
20590
+ return P(() => {
20591
+ const b = (k) => {
20592
+ c.current && c.current.contains(k.target) || l(!1);
20588
20593
  };
20589
20594
  return a && document.addEventListener("mousedown", b), () => {
20590
20595
  document.removeEventListener("mousedown", b);
@@ -20624,20 +20629,20 @@ const Ne = new z("chat-toolbar-item"), k7 = (n) => {
20624
20629
  )
20625
20630
  }
20626
20631
  ),
20627
- a && /* @__PURE__ */ h("div", { ref: c, className: Ne.b("dropdown"), children: (g = e.children) == null ? void 0 : g.map((b, w) => {
20632
+ a && /* @__PURE__ */ h("div", { ref: c, className: Ne.b("dropdown"), children: (g = e.children) == null ? void 0 : g.map((b, k) => {
20628
20633
  if (!u(b))
20629
20634
  return /* @__PURE__ */ h(
20630
20635
  "div",
20631
20636
  {
20632
20637
  title: b.title,
20633
- onClick: (k) => m(k, b),
20638
+ onClick: (w) => m(w, b),
20634
20639
  className: "".concat(Ne.be("dropdown", "item"), " ").concat(b.customClass || "", " ").concat(Ne.is("disabled", d(b))),
20635
20640
  children: [
20636
20641
  /* @__PURE__ */ h("div", { className: Ne.bem("dropdown", "item", "icon"), children: f(b) }),
20637
20642
  /* @__PURE__ */ h("div", { className: Ne.bem("dropdown", "item", "label"), children: b.label })
20638
20643
  ]
20639
20644
  },
20640
- w
20645
+ k
20641
20646
  );
20642
20647
  }) })
20643
20648
  ]
@@ -20670,7 +20675,7 @@ const x7 = new z("chat-toolbar"), Gn = (n) => {
20670
20675
  {
20671
20676
  label: C.t.value("refresh"),
20672
20677
  title: C.t.value("refresh"),
20673
- icon: () => /* @__PURE__ */ h(Rs, {}),
20678
+ icon: () => /* @__PURE__ */ h(Ps, {}),
20674
20679
  onClick: () => {
20675
20680
  e.refreshMessage(i);
20676
20681
  }
@@ -20699,7 +20704,7 @@ const x7 = new z("chat-toolbar"), Gn = (n) => {
20699
20704
  {
20700
20705
  label: C.t.value("refresh"),
20701
20706
  title: C.t.value("refresh"),
20702
- icon: () => /* @__PURE__ */ h(Rs, {}),
20707
+ icon: () => /* @__PURE__ */ h(Ps, {}),
20703
20708
  hidden: () => !!e.reEditContent.value,
20704
20709
  onClick: () => {
20705
20710
  e.refreshMessage(i, !0);
@@ -20781,7 +20786,7 @@ const T7 = (n) => {
20781
20786
  right: "".concat(n.right, "px"),
20782
20787
  bottom: "".concat(n.bottom, "px")
20783
20788
  };
20784
- }, [n.right, n.bottom]), R(() => {
20789
+ }, [n.right, n.bottom]), P(() => {
20785
20790
  var l;
20786
20791
  if (n.target) {
20787
20792
  const c = (l = document.querySelector(n.target)) != null ? l : void 0;
@@ -20810,7 +20815,7 @@ const kc = new z("chat-messages"), nr = (n) => {
20810
20815
  c.current = !1;
20811
20816
  }, 500));
20812
20817
  };
20813
- R(() => {
20818
+ P(() => {
20814
20819
  const g = u.value.length, b = d.current;
20815
20820
  g !== b && l(!0), a && m(), d.current = g;
20816
20821
  }, [u.value]);
@@ -20820,7 +20825,7 @@ const kc = new z("chat-messages"), nr = (n) => {
20820
20825
  const g = e.current;
20821
20826
  if (!g)
20822
20827
  return;
20823
- const { scrollTop: b, scrollHeight: w, clientHeight: k } = g;
20828
+ const { scrollTop: b, scrollHeight: k, clientHeight: w } = g;
20824
20829
  b < 100 && !s && p && (o(!0), setTimeout(() => {
20825
20830
  const T = Math.min(
20826
20831
  i + t,
@@ -20833,15 +20838,15 @@ const kc = new z("chat-messages"), nr = (n) => {
20833
20838
  g.scrollTop = O - M + g.scrollTop, o(!1);
20834
20839
  }, 0);
20835
20840
  }, 300));
20836
- const x = w - (b + k) < 50;
20841
+ const x = k - (b + w) < 50;
20837
20842
  l(x);
20838
20843
  }, y = () => {
20839
20844
  c.current = !0, l(!0);
20840
20845
  };
20841
20846
  return /* @__PURE__ */ h("div", { ref: e, className: kc.b(), onScroll: v, children: [
20842
20847
  f.map((g) => {
20843
- var w;
20844
- const b = ((w = g.content) == null ? void 0 : w.length) || 0;
20848
+ var k;
20849
+ const b = ((k = g.content) == null ? void 0 : k.length) || 0;
20845
20850
  return g.role !== "SYSTEM" ? /* @__PURE__ */ h(
20846
20851
  C7,
20847
20852
  {
@@ -21219,6 +21224,32 @@ class xc {
21219
21224
  return (s = this.opts.selectAIKnowledgeBaseId) == null ? void 0 : s.includes(r.id);
21220
21225
  }).map((r) => r.id) : e && (this.selectionKnowledgeBases.value = ((i = e.knowledge_bases) == null ? void 0 : i.map((r) => r.ai_knowledge_base_id)) || []);
21221
21226
  }
21227
+ /**
21228
+ * @description 知识库远程搜索
21229
+ * @param {string} query
21230
+ * @returns {*} {Promise<{ value: string; label: string }[]>}
21231
+ * @memberof AiChatController
21232
+ */
21233
+ async knowledgeRemoteSearch(e) {
21234
+ if (!this.enableKnowledgeBaseSelect.value)
21235
+ return [];
21236
+ const t = this.agentList.value.find((i) => i.id === this.activeAIAgentID);
21237
+ if (!t || t.allow_any_knowledge_base) {
21238
+ if (this.opts.fetchKnowledgeBaseList) {
21239
+ const i = await this.opts.fetchKnowledgeBaseList(e);
21240
+ if (i && i.length > 0)
21241
+ return i.map((r) => ({
21242
+ value: r.id,
21243
+ label: r.name
21244
+ }));
21245
+ }
21246
+ } else if (t && t.knowledge_bases && t.knowledge_bases.length > 0)
21247
+ return t.knowledge_bases.map((i) => ({
21248
+ value: i.ai_knowledge_base_id,
21249
+ label: i.ai_knowledge_base_name
21250
+ })).filter((i) => i.label.toLowerCase().includes(e.toLowerCase()));
21251
+ return [];
21252
+ }
21222
21253
  /**
21223
21254
  * 获取历史记录存储key(用于适配不同智能体存在不同的历史记录)
21224
21255
  * @param topicId 话题标识
@@ -21449,7 +21480,7 @@ class xc {
21449
21480
  ""
21450
21481
  ));
21451
21482
  const u = a.indexOf("<chatstep>"), d = a.indexOf("</chatstep>");
21452
- u !== -1 && d !== -1 && u < d && (i = Pu.parse(e.content), e.content = a.replace(new RegExp("\\<chatstep\\>[^]*?\\<\\/chatstep\\>", "gs"), ""));
21483
+ u !== -1 && d !== -1 && u < d && (i = Ru.parse(e.content), e.content = a.replace(new RegExp("\\<chatstep\\>[^]*?\\<\\/chatstep\\>", "gs"), ""));
21453
21484
  }
21454
21485
  const r = { ...e }, s = this.messages.value.findIndex(
21455
21486
  (a) => a.messageid === e.messageid
@@ -22009,8 +22040,8 @@ class xc {
22009
22040
  const v = o.action_context.split(";").reduce(
22010
22041
  (y, g) => {
22011
22042
  if (g.trim()) {
22012
- const [b, w] = g.split(":");
22013
- b && w && (y[b.trim()] = w.trim());
22043
+ const [b, k] = g.split(":");
22044
+ b && k && (y[b.trim()] = k.trim());
22014
22045
  }
22015
22046
  return y;
22016
22047
  },
@@ -22865,20 +22896,20 @@ class A7 extends hf {
22865
22896
  accept: s || "*/*",
22866
22897
  maxSize: o || 5 * 1024 * 1024,
22867
22898
  onSelect: (b) => {
22868
- c == null || c(b), b.length > 0 && b.forEach((w) => {
22869
- const k = this.buildMaterialObject(r, w);
22870
- Object.assign(k.metadata, { state: "uploading" }), this.aiChat.addMaterial(k);
22899
+ c == null || c(b), b.length > 0 && b.forEach((k) => {
22900
+ const w = this.buildMaterialObject(r, k);
22901
+ Object.assign(w.metadata, { state: "uploading" }), this.aiChat.addMaterial(w);
22871
22902
  });
22872
22903
  },
22873
- onUpload: async (b, w) => u(b, w, {
22904
+ onUpload: async (b, k) => u(b, k, {
22874
22905
  context: this.aiChat.context,
22875
22906
  params: this.aiChat.params
22876
22907
  }),
22877
22908
  onDownLoad: f,
22878
22909
  getDownLoadUrl: p,
22879
22910
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
22880
- onSuccess: (b, w) => {
22881
- const k = {
22911
+ onSuccess: (b, k) => {
22912
+ const w = {
22882
22913
  id: b.id,
22883
22914
  type: "ossfile",
22884
22915
  data: {
@@ -22897,14 +22928,14 @@ class A7 extends hf {
22897
22928
  folder: r
22898
22929
  }
22899
22930
  };
22900
- this.aiChat.replaceMaterial(w.name, k), d == null || d(b, w);
22931
+ this.aiChat.replaceMaterial(k.name, w), d == null || d(b, k);
22901
22932
  },
22902
- onError: (b, w) => {
22903
- const k = this.buildMaterialObject(r, w);
22904
- Object.assign(k.metadata, { state: "failed" }), this.aiChat.replaceMaterial(w.name, k), l == null || l(b, w);
22933
+ onError: (b, k) => {
22934
+ const w = this.buildMaterialObject(r, k);
22935
+ Object.assign(w.metadata, { state: "failed" }), this.aiChat.replaceMaterial(k.name, w), l == null || l(b, k);
22905
22936
  },
22906
- onProgress: (b, w) => {
22907
- m == null || m(b, w);
22937
+ onProgress: (b, k) => {
22938
+ m == null || m(b, k);
22908
22939
  }
22909
22940
  };
22910
22941
  new G0(y).openFilePicker();
@@ -23441,9 +23472,9 @@ class $7 extends ff {
23441
23472
  function K7() {
23442
23473
  return new $7();
23443
23474
  }
23444
- const P7 = new z("chat-input-material"), R7 = (n) => {
23475
+ const R7 = new z("chat-input-material"), P7 = (n) => {
23445
23476
  const e = n.controller.materials;
23446
- return /* @__PURE__ */ h("div", { className: P7.b(), children: e.value.map((t) => /* @__PURE__ */ h(
23477
+ return /* @__PURE__ */ h("div", { className: R7.b(), children: e.value.map((t) => /* @__PURE__ */ h(
23447
23478
  dr,
23448
23479
  {
23449
23480
  material: t,
@@ -23469,7 +23500,7 @@ const Ae = new z("chat-agent-setting"), L7 = (n) => {
23469
23500
  chunkthreshold: !1,
23470
23501
  chunkpageindex: !1
23471
23502
  });
23472
- R(() => {
23503
+ P(() => {
23473
23504
  const p = e.reCallConfig.value;
23474
23505
  r.value = {
23475
23506
  chunkrerank: p.chunkrerank !== 2,
@@ -23479,7 +23510,7 @@ const Ae = new z("chat-agent-setting"), L7 = (n) => {
23479
23510
  };
23480
23511
  }, [e.activeAIAgentID]);
23481
23512
  const s = F(null), o = F(null), [a, l] = j(!1);
23482
- R(() => {
23513
+ P(() => {
23483
23514
  const p = (m) => {
23484
23515
  var v, y;
23485
23516
  m.target && ((v = o.current) != null && v.contains(m.target)) || ((y = s.current) != null && y.contains(m.target) ? l((g) => !g) : l(!1));
@@ -23575,7 +23606,7 @@ const Ae = new z("chat-agent-setting"), L7 = (n) => {
23575
23606
  ] });
23576
23607
  };
23577
23608
  const G = new z("chat-input"), Tc = window.SpeechRecognition || window.webkitSpeechRecognition, ir = (n) => {
23578
- var b;
23609
+ var k;
23579
23610
  const [e, t] = j(!1);
23580
23611
  yo(Tr);
23581
23612
  const i = n.controller.input, r = $(!1), s = F(), o = F(null);
@@ -23584,19 +23615,19 @@ const G = new z("chat-input"), Tc = window.SpeechRecognition || window.webkitSpe
23584
23615
  }, s.current.onend = () => {
23585
23616
  r.value = !1;
23586
23617
  }, s.current.onresult = (w) => {
23587
- var x, T, M, O;
23588
- const k = (M = (T = (x = w.results) == null ? void 0 : x[0]) == null ? void 0 : T[0]) == null ? void 0 : M.transcript;
23589
- k && ((O = o.current) == null || O.commands.insertContent(k));
23618
+ var T, M, O, E;
23619
+ const x = (O = (M = (T = w.results) == null ? void 0 : T[0]) == null ? void 0 : M[0]) == null ? void 0 : O.transcript;
23620
+ x && ((E = o.current) == null || E.commands.insertContent(x));
23590
23621
  });
23591
23622
  const a = () => {
23592
- s.current && !r.value && s.current.start();
23623
+ s.current && (r.value ? s.current.stop() : s.current.start());
23593
23624
  }, l = we(() => As(i.value).length <= 0), c = Ha(async () => {
23594
23625
  var w;
23595
23626
  try {
23596
- const k = As(i.value);
23597
- i.value = "", (w = o.current) == null || w.chain().clearContent().run(), await n.controller.question(k);
23598
- } catch (k) {
23599
- console.error(k);
23627
+ const x = As(i.value);
23628
+ i.value = "", (w = o.current) == null || w.chain().clearContent().run(), await n.controller.question(x);
23629
+ } catch (x) {
23630
+ console.error(x);
23600
23631
  } finally {
23601
23632
  setTimeout(() => {
23602
23633
  o.current && !o.current.isDestroyed && o.current.chain().focus().run();
@@ -23616,20 +23647,20 @@ const G = new z("chat-input"), Tc = window.SpeechRecognition || window.webkitSpe
23616
23647
  "ossfile",
23617
23648
  n.controller
23618
23649
  ).excuteAction(w), t(!1);
23619
- }, p = async (w, k) => {
23650
+ }, p = async (w, x) => {
23620
23651
  await Sc.getMaterialHelper(
23621
23652
  "common",
23622
23653
  n.controller
23623
- ).excuteAction(w, k), t(!1);
23654
+ ).excuteAction(w, x), t(!1);
23624
23655
  }, m = (w) => {
23625
23656
  n.controller.setActiveAIAgentID(w);
23626
23657
  }, v = (w) => {
23627
23658
  n.controller.setSelectionKnowledge(w);
23628
23659
  }, y = () => {
23629
23660
  n.controller.switchKnowledgeEnableState();
23630
- }, g = async (w) => await n.controller.searchAIAgent(w);
23661
+ }, g = async (w) => await n.controller.knowledgeRemoteSearch(w), b = async (w) => await n.controller.searchAIAgent(w);
23631
23662
  return /* @__PURE__ */ h("div", { className: G.b("wrapper"), children: [
23632
- /* @__PURE__ */ h("div", { className: G.b("material-wrapper"), children: /* @__PURE__ */ h(R7, { controller: n.controller }) }),
23663
+ /* @__PURE__ */ h("div", { className: G.b("material-wrapper"), children: /* @__PURE__ */ h(P7, { controller: n.controller }) }),
23633
23664
  /* @__PURE__ */ h("div", { className: G.b("main-wrapper"), children: [
23634
23665
  /* @__PURE__ */ h(
23635
23666
  df,
@@ -23660,7 +23691,7 @@ const G = new z("chat-input"), Tc = window.SpeechRecognition || window.webkitSpe
23660
23691
  options: n.controller.agentList.value,
23661
23692
  icon: () => /* @__PURE__ */ h("div", { title: C.t.value("agent"), children: Eg() }),
23662
23693
  disabled: !n.controller.enableAIAgentChange,
23663
- onSearch: g,
23694
+ onSearch: b,
23664
23695
  onChange: (w) => m(w)
23665
23696
  }
23666
23697
  ),
@@ -23677,6 +23708,7 @@ const G = new z("chat-input"), Tc = window.SpeechRecognition || window.webkitSpe
23677
23708
  icon: () => /* @__PURE__ */ h("div", { title: C.t.value("knowledge"), children: Xu }),
23678
23709
  placeholder: C.t.value("knowledgeSearch"),
23679
23710
  value: n.controller.selectionKnowledgeBases.value,
23711
+ onSearch: (w) => g(w),
23680
23712
  onChange: v,
23681
23713
  onEnableChange: y
23682
23714
  }
@@ -23710,17 +23742,17 @@ const G = new z("chat-input"), Tc = window.SpeechRecognition || window.webkitSpe
23710
23742
  ]
23711
23743
  }
23712
23744
  ),
23713
- (b = n.questionToolbarItems) == null ? void 0 : b.map((w) => {
23714
- var k, x, T;
23745
+ (k = n.questionToolbarItems) == null ? void 0 : k.map((w) => {
23746
+ var x, T, M;
23715
23747
  return /* @__PURE__ */ h(
23716
23748
  "div",
23717
23749
  {
23718
23750
  className: G.b("pop-action-item"),
23719
- onClick: (M) => {
23720
- p(M, w);
23751
+ onClick: (O) => {
23752
+ p(O, w);
23721
23753
  },
23722
23754
  children: [
23723
- /* @__PURE__ */ h("span", { className: G.b("pop-action-item-icon"), children: typeof w.icon == "function" ? w.icon() : ((k = w.icon) == null ? void 0 : k.showIcon) && /* @__PURE__ */ h(Je, { children: (x = w.icon) != null && x.cssClass ? /* @__PURE__ */ h("i", { className: w.icon.cssClass }) : (T = w.icon) != null && T.imagePath ? ar(w.icon.imagePath) ? /* @__PURE__ */ h(
23755
+ /* @__PURE__ */ h("span", { className: G.b("pop-action-item-icon"), children: typeof w.icon == "function" ? w.icon() : ((x = w.icon) == null ? void 0 : x.showIcon) && /* @__PURE__ */ h(Je, { children: (T = w.icon) != null && T.cssClass ? /* @__PURE__ */ h("i", { className: w.icon.cssClass }) : (M = w.icon) != null && M.imagePath ? ar(w.icon.imagePath) ? /* @__PURE__ */ h(
23724
23756
  "div",
23725
23757
  {
23726
23758
  dangerouslySetInnerHTML: {
@@ -23809,8 +23841,8 @@ const De = new z("chat-topic-item"), z7 = (n) => {
23809
23841
  g.stopPropagation(), s("LINK", g);
23810
23842
  }, p = (g, b) => {
23811
23843
  g === "RENAME" ? (d.value = !0, setTimeout(() => {
23812
- var w;
23813
- (w = o.current) == null || w.focus();
23844
+ var k;
23845
+ (k = o.current) == null || k.focus();
23814
23846
  }, 100)) : s(g, b), c(!1);
23815
23847
  }, m = (g) => {
23816
23848
  var b;
@@ -23880,7 +23912,7 @@ const De = new z("chat-topic-item"), z7 = (n) => {
23880
23912
  };
23881
23913
  const Se = new z("chat-topics"), pf = (n) => {
23882
23914
  const e = F(null), t = $(void 0), i = $([]);
23883
- R(() => {
23915
+ P(() => {
23884
23916
  const d = [...n.controller.topics.value].sort((f, p) => f.isTop !== p.isTop ? p.isTop ? 1 : -1 : p.sequence - f.sequence);
23885
23917
  i.value = d.filter(
23886
23918
  (f) => {
@@ -23901,7 +23933,7 @@ const Se = new z("chat-topics"), pf = (n) => {
23901
23933
  }
23902
23934
  );
23903
23935
  };
23904
- R(() => {
23936
+ P(() => {
23905
23937
  const d = e.current;
23906
23938
  if (!d)
23907
23939
  return;
@@ -24063,7 +24095,7 @@ const tn = new z("chat-minimize"), B7 = (n) => {
24063
24095
  const m = e.current;
24064
24096
  m && (m.onmousedown = (v) => {
24065
24097
  document.body.style.userSelect = "none";
24066
- const y = v.clientX - m.offsetLeft, g = v.clientY - m.offsetTop, b = Date.now(), w = (x) => {
24098
+ const y = v.clientX - m.offsetLeft, g = v.clientY - m.offsetTop, b = Date.now(), k = (x) => {
24067
24099
  const T = 56 / window.innerWidth, M = 56 / window.innerHeight, { x: O, y: E } = Du(
24068
24100
  x.clientX - y,
24069
24101
  x.clientY - g,
@@ -24073,23 +24105,23 @@ const tn = new z("chat-minimize"), B7 = (n) => {
24073
24105
  Object.assign(a, { x: O, y: E }), requestAnimationFrame(() => {
24074
24106
  d();
24075
24107
  });
24076
- }, k = () => {
24108
+ }, w = () => {
24077
24109
  const x = Date.now();
24078
- o.current = x - b > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", k);
24110
+ o.current = x - b > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", w);
24079
24111
  };
24080
- document.addEventListener("mousemove", w), document.addEventListener("mouseup", k);
24112
+ document.addEventListener("mousemove", k), document.addEventListener("mouseup", w);
24081
24113
  });
24082
24114
  }, p = () => {
24083
24115
  o.current || n.onClick();
24084
24116
  };
24085
- return R(() => {
24117
+ return P(() => {
24086
24118
  const m = localStorage.getItem(te.MINIMIZE_STYLY_CHCHE);
24087
24119
  if (m) {
24088
24120
  const v = JSON.parse(m);
24089
24121
  Ds(v) && Object.assign(a, v);
24090
24122
  }
24091
24123
  d(), f();
24092
- }, []), R(() => {
24124
+ }, []), P(() => {
24093
24125
  if (r < u.value.length) {
24094
24126
  const m = setTimeout(() => {
24095
24127
  i((v) => v + u.value[r]), s((v) => v + 1);